HTML Concepts: Kinds of Elements
Published on May 31, 2023, filed under Web Development (RSS feed for all categories).
There are six (not two, five, or eight) different kinds of elements in HTML:
- Void elements:
area
,base
,br
,col
,embed
,hr
,img
,input
,link
,meta
,source
,track
, andwbr
- Raw text elements:
script
andstyle
- Escapable raw text elements:
textarea
andtitle
- The template element:
template
- Foreign elements: elements from the MathML and SVG namespaces
- Normal elements: all other allowed HTML elements
This classification is useful because these elements differ in key aspects. Void elements have no contents (they have no end tag, even if we wanted one). The template
element contains template contents. MathML and SVG relate to different specifications (and may therefore not even be counted as HTML elements).
As always (consider the Web Developer’s Pilgrimage), the HTML specification has the details: § 13.1.2 Elements. And this is part of a series: more HTML concepts.
About Me
![Jens Oliver Meiert, on September 30, 2021.](https://d3rdtowr0c5lpf.cloudfront.net/media/meiert-20210930.jpg)
I’m Jens (long: Jens Oliver Meiert), and I’m a frontend engineering leader and tech author/publisher. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m close to W3C and WHATWG, and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my views and experiences.
If you’d like to do me a favor, interpret charitably (I speak three languages, and they do collide), yet be critical and give feedback for me to fix issues, learn, and improve. Thank you!
Read More
Maybe of interest to you, too:
- Next: 48 Laws, Rules, and Principles of Web Development
- Previous: Website Issues: On the Relevance of Audience Size and Impact
- More under Web Development
- More from 2023
- Most popular posts
Looking for a way to comment? Comments have been disabled, unfortunately.
![Cover: The Web Development Glossary 3K.](https://d3rdtowr0c5lpf.cloudfront.net/de/publications/books/the-web-development-glossary-3k/cover-s.png)
Get a good look at web development? Try WebGlossary.info—and The Web Development Glossary 3K (2023). With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.