Everything2
Near Matches
Ignore Exact
Full Text
Everything2

HTML heading tags

created by Lord Brawl

(thing) by in10se (2.8 hr) (print)   ?   (I like it!) 1 C! Fri Jul 18 2003 at 19:14:09

Headers are a group of HTML tags that are used to group an HTML document into sections like in an outline. There are six levels of headers, each with their own element numbered h1-h6. While the sizes of each heading can be overridden with Cascading Style Sheets, by default, the most significant and largest header is h1 while the least significant and smallest is h6.

See also: h1, h2, h3, h4, h5, h6, b, big, font, small, strong

Attributes

The heading tags do not have any required HTML attributes. However, they do have a long list of optional attributes:

Usage

To use any of the header tags, simply place opening and closing HTML tags around the header text. For example:

<h1>Header Level 1</h1>
<h2>Header Level 2</h2>
<h3>Header Level 3</h3>
<h4>Header Level 4</h4>
<h5>Header Level 5</h5>
<h6>Header Level 6</h6>

On browsers that support this tag, this will typically cause the words "Header Level 1" to be very large, with each line getting smaller until the smallest header is reached at "Header Level 6".

The purpose of the tags are to structure your document for easier viewing and parsing. Therefore, the header tags should not be used to replace any tags for making text larger (big, font), smaller (small, font), or bolder (b, strong). In fact, as can be seen in the example below, the header tags are block elements, and will automatically cause a padded area above and below the header text similar to the p (paragraph) tag, so cannot be easily used as inline elements.1

Everything2 Support?

E2 does provide limited support for the all of the header tags. It does not allow the use of any of its HTML attributes. Below is how your browser displays the example above here on Everything2. You may notice that the sizes are not displayed as expected (especially in the ekw theme) due to the format of the style sheets used on E2.

Header Level 1

Header Level 2

Header Level 3

Header Level 4

Header Level 5
Header Level 6

If you would like to use this tag with any of its attributes, you can do so in your Notelet Nodelet.

Common Browser Implementations2

Most web browsers support these tags, as they have been around since at least HTML 2. Most browsers implement the tag as described above by rendering the header text in different sizes. It is the font and any style sheets used for the heading that will determine precisely how large it will be in the document.

Previous HTML Tag: frameset (previous E2 supported HTML tag: em)
Next HTML Tag: head (next E2 supported HTML tag: hr)
See Also: HTML tags and HTML attributes


1 You can work around the padding issue by using stylesheets, but you should be careful not to lose site of using this tag as a structural element.

2 Please feel free to send me information about how other browsers implement these tags.


(idea) by Zxaos (8.3 mon) (print)   ?   (I like it!) Sat Jun 26 2004 at 16:46:01

While in polite company, one would normally start their heading tags with h1 and works downwards through h6.

However, on E2 the name of the node is contained within h1 tags in the markup, so using an h1 tag within a writeup would place that heading as the same importance as the node title, which generally would not make much sense. (If the title is of the same importance as the node name, shouldn't the title be in a node of that name?)

It would therefore make more sense here (and be more semantically correct) for any use of heading tags within a writeup to begin with h2 and move downwards, since each item in a node should logically fit under the name of the node, which is of heading importance h1.


printable version
chaos

H1 Header Editor Log: January 2005 hypertext markup language
iHTML A Game of Tag Notelet nodelet HTML tricks Writing HTML is not coding
Invalid HTML using "h1" in "ol" or "ul" tags Logical HTML style harassment HTML attributes Cyrillic alphabet HTML
HTML tags A Study In Scarlet Harvey Milk Safe Passage Through the Night
Nagasaki Current 93 Dartmouth Review backwards masking
OL zen theme labia minora Hurry up please it's time
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
The best nodes of all time:
blink reflex
The Jazz Singer
Antarctica
Taoist alchemy
Stupid Word Tricks
Georg Hegel
Valerie Solanas
O Brother, Where Art Thou?
Why strapping buttered toast to a cat's back will not produce infinite power
Peak oil
How many ways can you say "ginger"?
How to convert a Super Nintendo controller to work on the PC
Chopstick vs. Fork
New Writeups
doctor wilson
Soup, of the green variety(recipe)
Ctrl Y
cognitive dissonance(fiction)
SharQ
Gone Baby Gone(review)
halfWit
If I could, I'd title this "Freedom"(thing)
Roninspoon
Airline Hero(thing)
Ktistec
Why Women Are Always Cold(person)
doctor wilson
Drug policy reform(thing)
tejasa
Easy Raspberry Cheesecake(recipe)
Joysim
Drug policy reform(idea)
aneurin
Tyburn(place)
niruena
Boiling to death(idea)
artman2003
summer(thing)
doctor wilson
The Silver City and the Silent Sea(log)
Dreamvirus
The Silver City and the Silent Sea(poetry)
Aerobe
A nihilist's soulmate(poetry)
This page courtesy of The Everything Development Company