Structural Elements
Tag Name | Usage | Structure | Notes | Example (Code) | Example (Live) | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
article | This tag creates a container for smaller sections of the page, eg. blog posts, comments. |
<article>
<!-- Insert your content here -->
</article>
|
|
<article>
<h4>This is my section title</h4>
</article>
<p>Let's write some content here!</p> |
This is my section titleLet's write some content here! |
||||||||||||||||||||||||
aside | This tag creates a section to describe content related to the main content. It is also not read by text to audio readers. |
<aside>
<!-- Insert your content here -->
</aside>
|
|
<aside>
<p>Actuarial services is defined as...</p>
</aside>
|
|||||||||||||||||||||||||
bdi | This tag isolates text that could be written in a different direction (eg. Arabic) compared to the rest of the body text. | <bdi><!-- Insert your content here --></bdi> |
This element is not supported on Internet Explorer/Edge |
Time to learn some Arabic! Here's a word: <bdi>إيان</bdi> | Time to learn some Arabic! Here's a word: إيان | ||||||||||||||||||||||||
details | This tag specifies additional details which the user and view/hide on demand. |
<details>
<!-- Insert your content here -->
</details>
|
|
<details open>
<p>Here is a picture of me in New York City!</p>
</details>
|
Here is a picture of me in New York City! |
||||||||||||||||||||||||
dialog | This tag creates a separate dialog box to contain information. | <dialog><!-- Insert your content here --></dialog> |
|
<p>I went to Japan last week <dialog open>I would like to go to Hokkaido in my next trip!</dialog>and will be going to China next week!</p> |
I went to Japan last week and will be going to China next week! |
||||||||||||||||||||||||
figcaption | This tag is used to create a caption for a photo. | <figcaption><!-- Insert your content here --></figcaption> |
There are no additional notes for this tag. |
<figure>
<img src="./resources/miso_butterfly.jpg" style="width: 200px; height: 300px; object-fit: cover;" />
<figcaption>Miso dressing up as a butterfly for Halloween 2021!</figcaption>
</figure>
|
|||||||||||||||||||||||||
figure | This tag is used to display a photo separate from the main body. |
<figure>
<!-- Insert your content here -->
</figure>
|
This is not supported on Internet Explorer 8 and earlier. |
<figure>
<img src="./resources/miso_butterfly.jpg" style="width: 200px; height: 300px; object-fit: cover;" />
</figure>
|
|||||||||||||||||||||||||
footer | This tag is used for a footer which would usually contain information about the website, page or product. |
<footer>
<!-- Insert your content here -->
</footer>
|
This is not supported on Internet Explorer 8 and earlier. |
<footer>
This page has been coded by Caitlyn Sun.
</footer>
|
|||||||||||||||||||||||||
header | This tag is used for a header which would usually contain introductory information about the website, page or product and/or a navigation bar. |
<header>
<!-- Insert your content here -->
</header>
|
There are no additional notes for this tag. |
<header>
<div>
</header>
<img src="./resources/miso_butterfly.jpg" />
</div>
<div>Welcome to Miso's fan page!</div> <nav>
<ul>
</nav>
<a href="#"><li>About</li></a>
</ul>
<a href="#"><li>News</li></a> |
Welcome to Miso's fan page!
|
||||||||||||||||||||||||
main | This tag is used for the main body which is usuall all of the visual HTML elements with the exception of the header and footer. |
<main>
<!-- Insert your content here -->
</main>
|
This is not supported on Internet Explorer 11 and earlier. |
<main>
<p>Here is my main body!</>
</main>
|
Here is my main body! |
||||||||||||||||||||||||
mark | This tag is used to highlight certain text. | <mark><!-- Insert your content here --></mark> |
|
Let's highlight this <mark>word</mark> | Let's highlight this word | ||||||||||||||||||||||||
meter | This tag is used to display a visual gauge of a number within a range. | <meter></meter> |
|
10 <meter low="40" high="90" min="10" max="110" optimum="80" value="60"></meter> 110 |
10 |
||||||||||||||||||||||||
nav | This tag is used as a container for navigation elements. |
<nav>
<!-- Insert your content here -->
</nav>
|
This is not supported on Internet Explorer 8 and earlier. |
<header>
<div>
</header>
<img src="./resources/miso_butterfly.jpg" />
</div>
<div>Welcome to Miso's fan page!</div> <nav>
<ul>
</nav>
<a href="#"><li>About</li></a>
</ul>
<a href="#"><li>News</li></a> |
Welcome to Miso's fan page!
|
||||||||||||||||||||||||
progress | This tag is used to display the progress of a task. | <progress></progress> |
|
0 <progress max="100" value="60"></progress> 100 | 0 100 | ||||||||||||||||||||||||
rp | This tag is used to display parentheses if the browser does not support ruby annotations. | <rp></rp> |
|
<ruby>今日<rp>(</rp><rt>きょう</rt><rp>)</rp></ruby>、<ruby>猫<rp>(</rp><rt>ねこ</rt><rp>)</rp></ruby>ちゃんは<ruby>魚<rp>(</rp><rt>さかな</rt><rp>)</rp></ruby>を<ruby>食<rp>(</rp><rt>た</rt><rp>)</rp></ruby>べました。 | 今日、猫ちゃんは魚を食べました。 | ||||||||||||||||||||||||
rt | This tag is used to indicate ruby characters that would be displayed above a character. | <rt></rt> |
|
<ruby>今日<rt>きょう</rt></ruby>、<ruby>猫<rt>ねこ</rt></ruby>ちゃんは<ruby>魚<rt>さかな</rt></ruby>を<ruby>食<rt>た</rt></ruby>べました。 | 今日、猫ちゃんは魚を食べました。 | ||||||||||||||||||||||||
ruby | This tag is used to indicate ruby characters will be used. | <ruby></ruby> |
|
<ruby>今日<rt>きょう</rt></ruby>、<ruby>猫<rt>ねこ</rt></ruby>ちゃんは<ruby>魚<rt>さかな</rt></ruby>を<ruby>食<rt>た</rt></ruby>べました。 | 今日、猫ちゃんは魚を食べました。 | ||||||||||||||||||||||||
section | This tag is used as a space for a section, such has chapters. | <section></section> |
This is not supported on Internet Explorer 8 and earlier. |
<section>
<h4>Here is a section!</h5>
</section>
<p>Add some text</p> |
Here is a section!Add some text |
||||||||||||||||||||||||
summary | This tag sets a visible heading for the details element it is inside. | <summary><!-- Insert your content here --></summary> |
This element is not supported on Internet Explorer/Edge |
<details open>
<summary>Photo Caption<summary>
</details>
<p>Here is a picture of me in New York City!</p> |
Photo CaptionHere is a picture of me in New York City! |
||||||||||||||||||||||||
time | This tag is used to encode date and time values. | <time></time> |
|
I need to remember to go to the dentist on <time datetime="2022-01-20 15:00">Thursday</time>. | I need to remember to go to the dentist on Thursday. | ||||||||||||||||||||||||
wbr | This tag is indicates where word breaks are fine, particularly when the string is too long. | <wbr> |
This is not supported on Internet Explorer 11 and earlier. |
Ishallmake<wbr> |
Ishallmake |