Tutorialsplane

Html Attributes


Html Attributes: Html element’s attribute are used to provide some more information about the element.


This way you can use Attributes Syntax

<start_tag attribute_name="Attribute Value">
</start_tag>

Note 1 : Attributes are always defined in the start tag of the element.
Note 2 : Single Quote or double Quote any one can be used.
Example :

<start_tag attribute_name="Attribute Value">
</start_tag>

Lets Understand with very simple examples:

Html Attributes Example : Title

Example




<title>Title</title>




<p title="My first Paragraph">Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....Demo text....</p>



Try it »

Output :

Html Attributes Example

Attributes Example : href

Example




<title>Title</title>



<a href="https://www.google.com"> Google.com</a>



Try it »

Output :

Html Formatting