Attributes in HTML
HTML Attributes
- All HTML elements can have attributes
- Attributes provide additional information about elements
- Attributes are always specified in the start tag
- Attributes usually come in name/value pairs like: name="value"
The href(Hypertext Reference) Attribute
The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:
Input:-
<html>
<body>
<h2>The href Attribute</h2>
<p>HTML links are defined with the a tag. The link address is specified in the href attribute:</p>
<a href="https://newcodingtypes.blogspot.com/">Visit New Coding Times Blog</a>
</body>
</html>
Output:-
The href Attribute
HTML links are defined with a tag. The link address is specified in the href attribute:
Comments
Post a Comment