HTML Reference
Example
<nav>
<ul>
<li><a href="#">Somewhere</a></li>
<li><a href="#">Anywhere</a></li>
<li><a href="#">Nowhere</a></li>
</ul>
</nav>
<section>
Description
Defines a docum ent’s section representing a them atic group-
ing of content, ty pically with a heading. An example of a
section would b e a ch apter.
Category Sectioning element
Display
Block
Example
<section>
<h1>General Description</h1>
<p>Dinosaurs have always been extremely fascinating animals.
Especially ...</p>
</section>
C.5 Grouping
<br>
Full name Break
Description
Introduces a line break. T his element should only be used
for line breaks that are re ally part of th e content, such as line
breaks in poems or addresses.
Content
This is a void element.
C.5. Grouping 315
Example
<p>
In Xanadu did Kubla Khan <br>
A stately pleasure dome decree: <br>
Where Alph, the sacred river, ran <br>
Through caverns measureless to man <br>
Down to a sunless sea. <br>
...
</p>
<div>
Full name
Division
Description
Defines a generic con ta iner, which does not in herently rep-
resent anything. It is n ormally used to group elem ents for
styling purposes. Do not use this element if other semantic
elements (such as < section> or <art icle>) are available.
Display
Block
Example
<div class="FortuneCookie">
<h1>Your fortune cookie for today</h1>
<p>You’re just another brick in the wall.</p>
</div>
<figcaption>
Full name Figure Cap tion
Description
Represents a caption or legend for the content of its parent
<figure> element.
Context
The eleme nt can only be used as a first or last child of a
<figure> element.
Display Block
316 HTML Reference
HTML Reference
Example
<figure>
<img src="before.jpg" alt="Old-Looking">
<img src="after.jpg" alt="Young-Looking">
<figcaption>
Before and after our amazing Drop-Pounds-and-Lose-Inches Diet.
</figcaption>
</figure>
<figure>
Description Represents some self- contained conten t, usually with a cap-
tion specified by the first <figcaption> element inside the
<figure> element. The <figur e> element can be used to
add explanations to illustrations, charts, photos, computer
code listings, or the like, which are referenced fro m the text
of the main document. They could be moved away from
that pr imary text w ithout aecting the flow of th e document.
The outline of the <figure> element is not a part of the
main d ocument outline.
Category
Sectioning root
Display
Block
<hr>
Full name
Horizontal Rule (historic name)
Description Represents a thematic break between paragraphs, such as a
transition to another topic within a section or a change of
scene in a story.
Content
This is a void element.
Display
Block
C.5. Grouping 317
Example
<p>...until the last one of them fell asleep.</p>
<hr>
<p>Early next morning, a magnificent nuclear explosion
on a nearby meadow woke them up for a fleeting instant...</p>
<li>
Full name List Item
Description Represents a list or menu item.
Context
May be used inside <ol> or <ul> elements.
Display
Block
Example
<!-- NOTE: since <ol> and <ul> elements can only contain <li>
elements, you can make a sublist by nesting another list
inside an <li> element. -->
<ul>
<li>Immortals
<ul>
<li>Aphrodite</li>
<li>Ares</li>
<li>Hermes</li>
<li>Zeus</li>
</ul>
</li>
<li>Mortals
<ul>
<li>Achilles</li>
<li>Electra</li>
</ul>
</li>
</ul>
<ol>
Full name
Ordered List
318 HTML Reference
HTML Reference
Description Represents a list of items where the orde r of items is imp or-
tant to the meaning of the document.
Content Zero or more <l i> elements
Display Block
Attributes
start
This a ttribute must be a valid integer. It gives the ordinal number of the first item.
Example
The Ten Commandments (Exodus 20:1-17 NKJV continued):
<ol start="6">
<li>You shall not murder.</li>
<li>You shall not commit adultery.</li>
<li>You shall not steal.</li>
<li>You shall not bear false witness against your neighbor.</li>
<li>You shall not covet your neighbor’s house; you shall not
covet your neighbor’s wife, or his male servant, or his
female servant, or his ox, or his donkey, or anything that
is your neighbor’s.</li>
</ol>
<p>
Full name Paragraph
Description Represents a paragraph.
Content
Can only contain text and inline elements.
Display
Block
<pre>
Full name
Preformatted
C.5. Grouping 319
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.37.250