Main heading === … ===

The main heading typically gives readers a quick idea of what to expect from the content of a webpage. Sometimes headings are kept ambiguous to cleverly rouse interest in potential readers. In either case, a main heading is usually the first text that a user reads on a webpage and displayed big and with a bold font at or near the top of the page.

If you do not declare title metadata for your webpage, the Aneamal Translator will automatically use the first main heading as title, too.

How to

Mark both the start and the end of a main heading with triple equal signs like in the examples below.

The main heading is a block, so it usually needs to be preceded by a blank line unless it is at the start of a file.

There can be sublines such as a byline, which names the author of the webpage, or a tagline as in the third example immediately below and associated with the main heading. The main heading or its last subline respectively need to be separated by a blank line from the first paragraph of the article though.

Examples

The following examples use movie titles to demonstrate main headings. The first example is a simple headline:

=== Ghost Dog: The Way of the Samurai ===

Ghost Dog: The Way of the Samurai

The second example shows a long main heading split onto two lines. The second line is displayed smaller, but it is still part of the main heading:

=== Dr. Strangelove
or: How I Learned to Stop Worrying and Love the Bomb ===

Dr. Strangelove
or: How I Learned to Stop Worrying and Love the Bomb

The third example shows a very short main heading. Directly below is a tagline that is not a part of the main heading, but is associated with it:

=== Alien ===
In space no one can hear you scream.

Alien

In space no one can hear you scream.

For developers

When Aneamal is translated to HTML, the main heading is turned into an HTML h1 element. So the first example becomes:

<h1>Ghost Dog: The Way of the Samurai</h1>

Line breaks in a heading are translated to HTML br elements and each line except the first is wrapped in HTML span elements. Hence the second example becomes:

<h1>Dr. Strangelove<br><span>or: How I Learned to Stop Worrying and Love the Bomb</span></h1>

CSS can be used to style subsequent lines in the heading differently from the first. This CSS code reduces their font size:

h1 > br + span {
	font-size: smaller;
}

Sublines associated with the main heading get wrapped in an HTML p element, which is wrapped together with the h1 heading in an hgroup element. So the third example becomes:

<hgroup>
<h1>Alien</h1>
<p>In space no one can hear you scream.</p>
</hgroup>

Default title

The main heading is used as HTML title as well, if no title metadata has been declared. The above examples would be translated as follows then.

<title>Ghost Dog: The Way of the Samurai</title>
<title>Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb</title>
<title>Alien</title>

See also