What is an HTML Attribute?

Simply put, an HTML attribute add extra info to the HTML elements.


<element attribute-name=“value”> content </element>


<!DOCTYPE html>
call me heading, I am also a element, I am also a Style attribute even if you can’t see me
<p style=“height: 55px; color: green”>
call me paragraph, with style property of height and color green


attribute name in color orange and attribute value in color blue and everything inside the html tags are consider elements

Similar Posts