Attributes give meta data to elements.
We use Attributes in start tag always.
Attributes are used with value.
Some attribute have not value so internally DOM manage to that attribute.
Attribute Syntax: -
<start_tag attribute_name="value1"> content or element based on requirement</endtag>
example:-
<img src="avtar.png" width="50" height="50">
Here src, width , height is attributes.
Attributes without value:-
readonly
disabled
checked
selected
multiple
etc
Try HTML Attribute Example in Editor
We use Attributes in start tag always.
Attributes are used with value.
Some attribute have not value so internally DOM manage to that attribute.
Attribute Syntax: -
<start_tag attribute_name="value1"> content or element based on requirement</endtag>
example:-
<img src="avtar.png" width="50" height="50">
Here src, width , height is attributes.
Attributes without value:-
readonly
disabled
checked
selected
multiple
etc
Try HTML Attribute Example in Editor
No comments:
Post a Comment