Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
|
|
Header Tags
This is a discussion on Header Tags, within the Beginners' Questions section. This forum and the thread "Header Tags" are both part of the Designing Your Website category.
![]() ![]() |
Jun 28 2008, 09:23 PM
Post
#1
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 199 Joined: 15-February 08 From: Plymouth Member No.: 153 |
I've been having discussions with 'people' again and it's resulted in the following stupid question:
Can you only have 1 <h1> tag and then one of each of the others in descending order on the page? i.e. <h1>Title <h2>Sub title <h3>Other heading Thanks in advance. P -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Jun 28 2008, 11:27 PM
Post
#2
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Team Leaders Posts: 568 Joined: 13-February 08 From: Catching the squeezed drips downunder. Member No.: 13 |
You don't have to restrict yourself to one <h1> tag. The <h1> tag says that this is the header the title for the page. There may be cases however that your page has two completely distinct content areas on the site. In this case it is acceptable to use another <h1> tag.
The next levels divide up the subsections of the page. If you have many subsections under a <h1> you can use many <h2>'s and for their conten, you can divide them by <h3>'s and <h4>'s etc. <h1> Main content title <h2>Subsection <h3>sub sub section <h3>sub sub section <h4> Sub sub sub section <h4> sub sub sub section <h2> subsection <h1>Completely new content -- rarely needed, you should proabably split the page <h2>Subsection <h3>sub sub section <h3>sub sub section <h4> Sub sub sub section <h4> sub sub sub section <h2> subsection You treat them sort of like you treat html tags. <h1> has child <h2>'s and <h2> has hcild <h3>'s etc. -------------------- Bright Idea? -- Don't Let it disappear
|
|
|
Jun 29 2008, 05:18 AM
Post
#3
|
|
|
Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Mentor Posts: 505 Joined: 15-February 08 From: UK Member No.: 143 |
In terms of syntactical correctness (HTML validation), it makes no difference. You can use <h1> -- <h6> in any order, any number of times, or omit them altogether.
In terms of semantics (meaningful markup), you should never skip a heading level; use headings in the way indicated by Rakuli's example. The first heading on the page (if you use headings at all) should always be an <h1>. The next heading should not be an <h3> (you need an <h2> first). Sometimes styling concerns may tempt you to skip a heading. Resist this temptation, and restyle the headings instead where necessary. For example: I change the formatting of <h2>s in my footer and sidebar, so that they look like <h3>s. This maintains a logical document structure, while also allowing sensible styles (the normal <h2> style would look wacko if applied in the sidebar or footer). I recommend using only one <h1>. By using a single, top-level heading, you indicate what the entire page is about. The page is the atomic unit of the web; divide your content logically into pages. On the other hand, you might reasonably argue that site-wide areas (such as preferences/nav) should not be categorised under the page title. That might lead one towards using multiple <h1>s: <h1>Content title</h1> <h2>Sub-topic</h2> <h1>Preferences/nav</h1> |
|
|
Jun 29 2008, 11:25 AM
Post
#4
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 199 Joined: 15-February 08 From: Plymouth Member No.: 153 |
Thanks guys!
-------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
3 | unitedcraig | 111 | 22nd February 2008 - 03:02 PM Last post by: karinne |
|||
![]() |
10 | Popje | 279 | 4th April 2008 - 10:07 PM Last post by: Popje |
|||
![]() |
6 | Jason | 130 | 4th April 2008 - 08:04 AM Last post by: Linda |
|||
![]() |
23 | Popje | 430 | 7th April 2008 - 04:55 PM Last post by: Popje |
|||
![]() |
5 | Ryan | 192 | 21st May 2008 - 09:30 PM Last post by: AndyinColor |
|||







Jun 28 2008, 09:23 PM









