HTML: Horizontal line

This entry is part 16 of 34 in the series HTML

Horizontal line is useful as a divider between sections of a webpage.

To add a horizontal line, simply add the following one-sided tag where you want the line to appear.

<hr>

By default, the line runs the entire width of the browser windows, is two pixels in height, and is black with a chiseled effect.

You can change these characteristics by applying attributes within the tag.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Horizontal Line</title>
</head>
<body>

<h3>British Pop</h3>
<hr>
<h3>American Rock</h3>

</body>
</html>
Horizontal Line

HTML: Special characters or entities

This entry is part 15 of 34 in the series HTML

Special characters are characters that are not included on a standard English keyboard.

An example would be copyright symbol ©.

We could either use the entity name &copy or the entity number to display the special character.

SymbolEntity NameEntity Number
& (ampersand)&amp;&#38;
< (less than)&lt;&#60;
> (greater than)&gt;&#62;
(nonbreaking space)&nbsp;&#160;
¢ (cent)&cent;&#162;
£ (pound)&pound;&#163;
¥ (yen)&yen;&#165;
© (copyright)&copy;&#169;
® (registered trademark)&reg;&#174;
° (degree)&deg;&#176;
± (plus or minus)&plusmn;&#177;
†(dagger)&dagger;&#8224;
™ (trademark)&trade;&#8482;
<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Special Characters</title>
</head>
<body>

<h4>Copyright &copy; Codecrawl&trade;</h4>

</body>
</html>
Special Characters

HTML: Definition lists

This entry is part 14 of 34 in the series HTML

A definition list presents terms with their definitions, similar to glossary.

This is done by using <dl>, <dt> and <dd>.  <dt> is for the term and <dd> is for the definition.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Lists</title>
</head>
<body>

<dl>
    <dt>Blur</dt>
    <dd>Blur are an English rock band, formed in London in 1988 as Seymour.</dd>
    <br>
    <dt>The Stone Roses</dt>
    <dd>The Stone Roses are an English rock band formed in Manchester in 1983. They were one of the pioneering groups of
        the Madchester movement that was active during the late 1980s and early 1990s.
    </dd>
    <br>
    <dt>Suede</dt>
    <dd>Suede are an English alternative rock band from London, formed in 1989.</dd>
</dl>

</body>
</html>

Lists

HTML: Changing numbering for one item in the list

This entry is part 13 of 34 in the series HTML

You can use the value=’n’ attribute for an individual list item <li> if you want to change the numbering for one item only.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Lists</title>
</head>
<body>

<h4>British Pop</h4>
<ol start='11'>
    <li>Cold Play</li>
    <li>Depeche Mode</li>
    <li>Adele</li>
    <li value='21'>New Order</li>
</ol>

</body>
</html>
Numbering For One Item

HTML: Specifying the start of a numbered list

This entry is part 12 of 34 in the series HTML

To start a numbered list at a number other than 1, use the start=’n’ attribute with the <ol> tag, where n is the starting number.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Lists</title>
</head>
<body>

<h4>British Pop</h4>
<ol start='11'>
    <li>Cold Play</li>
    <li>Depeche Mode</li>
    <li>Adele</li>
    <li>New Order</li>
</ol>

</body>
</html>



Numbered List