+ 4

What is the difference between element and attribute in html?

elements and attribute of html and html5

2nd May 2017, 12:19 PM
venkata ramarao yarlagadda
venkata ramarao yarlagadda - avatar
4 odpowiedzi
+ 14
Html elements are basically tags And attributes are used for defining its characteristic or properties. For eg <img src="a.jpg" height="200px" width="200px"> Here IMG is an element. src, height, width are attributes. ☺️
2nd May 2017, 5:58 PM
Vidya
Vidya - avatar
+ 4
HTML-elements can contain attributes. For example a div-element can contain the class attribute: <div class="my-class"></div>
2nd May 2017, 12:26 PM
Thanh Le
Thanh Le - avatar
+ 3
element can contain attributes. attributes used to give some effect or style to html element. for example, align="right"
2nd May 2017, 1:01 PM
Cakkavati Kusuma
0
Attributes modifies the thing it's talking about while elements are the defining of that property
13th Jul 2017, 11:46 PM
David Cogan
David Cogan - avatar