By this point, I think it's clear that HTML elements run the gamut from content to container to logic to edge case. Some elements we can see, others not so much. Some elements are meant to combine with others. Some elements are only meant for your browser to read. Some elements had good intentions but never picked up mainstream use.
There are over a hundred HTML elements. This page uses all of them. You're looking at <p></p> right now.
HTML loves text. We can get some huge text with <h1></h1>.
Or smaller with <h2></h2>
And so on...
And so on...
And so on...
And... nope that's it for headings. These are all in an <hgroup></hgroup> by the way.
Some text is <pre></pre>-formatted. Just a different look.
-
We can make a list with <ul></ul>
- and
- some
- <li></li>s
-
Or a numbered list with <ol></ol>
- and
- some
- <li></li>s
-
Or even a description list with <dl></dl>.
- It
- holds
- description terms, <dt></dt>
- and description definitions, <dd></dd>.
<blockquote></blockquote> indents text. How credible!
<q></q> is block's little brother.
![figure](/_astro/figure.o8SCE8C_.png)
We can get a lot fancier with text of course with elements like <strong></strong>, <em></em>, and <mark></mark>.
<b></b> bolds
<i></i> italicizes
<u></u> underlines
<small></small> is small
<sub></sub> subscripts
<sup></sup> superscripts
<s></s> is for marking text as accurate... err never mind
<ins></ins> marks text as inserted
<del></del> marks text as deleted
<bdi></bdi> is for isolating text that may flow in a different direction than surrounding text: ex. محمد.
<bdo></bdo> is for overriding the direction of text: ex. محمد.
Ah, now there's some breathing room, thanks to <br />.
You can <cite></cite> this website as Every HTML Element. And this whole thing is <code></code>,
living on the WWW.
That sense of Ctrl might all be in your head. Well, actually it's in <kbd>.
This is defined. And this is a <var></var>iable.
How bout some hidden gems? 漢
Here's a taste of a <samp></samp><span></span> doesn't do much alone. But who can?
Here's an opportunity for a break <wbr/>.
All this text... where does it live? Well we're inside the <main></main> <body></body> of an <html></html> document. There's a <head></head> here with us too. The <head></head> thinks about things like <link>s to other things, <meta>data, our <style></style>, and our <title></title>.
A <header></header> is different than the head. It's for content.
That concludes this section.
HTML is more than text.
![figure](/_astro/map.ZvQu5ZE9.png)
Sometimes it's more fun to listen than read. This is the sound of the website being made.
And this is a video.
In other words, media! Media everywhere.
That's
Element | Purpose | Used? | Notes |
---|---|---|---|
<html> | The root element of the page | ✔️ | Without this, you're not doing HTML. |
<marquee> (deprecated) | Scrolling text | X | Now that would've been fun. |
<blink> (deprecated) | Flashing text | X️ | This one not so much. |
Disclaimer: No web standards were harmed in the making of this table. |
You can interact with HTML beyond a form too!
Click me!
🎉 Surprise! Congratulations! 🥳
That concludes our journey! I lied a bit at the beginning. There are more elements than this: experimental ones, deprecated ones, web components, hydrogen, oxygen, and so on. Regardless, I hope this text got you a little hyper because, mark my words, you're speaking a new language now.