Core HTML

Headings Tags

We often want several levels of headings to for subtitles, chapters, and sections, in addition to the main title that goes in the h1 tag. Here, we have the text of the beginning of the Didache with three headings in three levels.

Headings.html

<!DOCTYPE html>
<html>
  <head>
    <title>XoaX.net's HTML: Headings Example</title>
  </head>
  <body>
    <h1>The Didache: The Teaching of the Twelve Apostles</h1>
    <h2>Part 1. The Two Ways</h2>
    <h3>The Way of Life</h3>
    <p>There are two Ways: a Way of Life and a Way of Death, and the difference between these
    two Ways is great.</p>

    <p>The Way of Life is this: "Thou shalt love first the Lord thy Creator, and secondly thy
    neighbour as thyself; and thou shalt do nothing to any man that thou wouldst not wish to be
    done to thyself."</p>

    <p>What you may learn from these words is to bless them that curse you, to pray for your
    enemies, and to fast for your persecutors.  For where is the merit in loving only those who
    return your love?  Even the heathens do as much as that. But if you love those who hate you,
    you will have nobody to be your enemy.</p>

    <p>Beware of the carnal appetites of the body. If someone strikes you on the right cheek,
    turn the other one to him as well, and perfection will be yours. Should anyone compel you to
    go a mile, go another one with him. If someone takes away your coat, let him have your shirt
    too. If someone seizes anything belonging to you, do not ask for it back again (you could not
    get it, anyway).  Give to everyone that asks, without looking for any repayment, for it is the
    Father's pleasure that we should share His gracious bounty with all men. A giver who gives
    freely, as the commandment directs, is blessed; no fault can be found with him.</p>

    <p>But woe to the taker; for though he cannot be blamed for taking if he was in need, yet
    if he was not, an account will be required of him as to why he took it, and for what purpose,
    and he will be taken into custody and examined about his action, and he will not get out until
    he has paid the last penny. The old saying is in point here: "Let your alms grow damp with
    sweat in your hand, until you know who it is you are giving them to.</p>
  </body>
</html>
 

Output

 
 

© 2007–2024 XoaX.net LLC. All rights reserved.