Why We Are Using HTML Attributes

admin_img Posted By Bajarangi soft , Posted On 30-09-2020

HTML elements can have attributes provide additional information about elements ,always specified in the start tag,Attributes usually come in name/value pairs like: name="value",The value of the title attribute will be displayed as a tooltip when you mouse over the element:

Attributes  In HTML Page

1.Create Attributes to the HTMl Page

<!DOCTYPE html>
<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="www.gmail.com">Visit gmail</a>

</body>
</html>

2.  title Attributes  to the HTML Page

<!DOCTYPE html>
<html>
<body>
<h2 title="I'm a header">The title Attribute</h2>
<p title="I'm a tooltip">Mouse over this paragraph, to display the title attribute as a tooltip.</p>

</body>
</html>

Related Post