Elements, Start Tags, Attributes and values, End Tags, Content
Element Names
- Element names are defined by the HTML5 Standard
- HTML5 has 116 elements defined (as of August 2021).
The elements that are part of HTML5 are fairly stable and are not rapidly evolving.In our "skeleton" document, we've already encountered the
html
,head
,title
,meta
,body
elements.
Attributes and Values
- Not all elements will have attributes
- Some start tags will have more than one different attributes defined. For example:
<link rel="stylesheet" href="styles/site.css" />
Content
- Not all elements will have "content". These are often called "empty".
Examples include:
br
,img
,link
,meta
- Content can be text
- Content can be other elements
End Tags
- For empty elements, the end tag is part of the start tag! For example:
<img src="images/harvard-shield.png" alt="Harvard Veritas Shield" />
- Some end tags are optional. But more about this later.