HTML 5 attributes are written inside the element's tag and separated by spaces. all of HTML elements can have Attributes.
we can provide additional information about an element using HTML attributes.Attributes are always specified in the start tag.
EX : -
- <input type="text" value="hello Web"/>
- <a href="https://www.google.com">This is a link</a>
The Id Attribute
The name Attribute
The Id attribute is a unique Identifier for the element.The Id property becomes very useful when using CSS and JavaScript.An example of the Id Attribute.
<form id="htm_form">
</form>
The name Attribute specifies a name for an element.Conventionally groups if elements can have the same name.
The class attribute
This specifies the style class under which an element falls. NB:An Attribute can also be called a property
No comments:
Post a Comment