473,796 Members | 2,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML headings article

I wrote an article on HTML headings:
http://codewallop.110mb.com/goodprac...adingology.htm

--
Spartanicus
Apr 8 '07
22 2523
John Hosking wrote:
Well, then: how about we split the difference. Keep the semantic logic
of heading *levels*, but bend their *presentation* to suit the content.

h1 {font-size:180%;} /* or whatever sizes we really like */
h2 {font-size:160%;} /* and bold and text-align as we like */
h3 {font-size:140%;}
h4 {font-size:120%;}
.caseStudy {font-size:120%; bottom-border:1px dotted grey;}
Nope, still not happy with that as a solution at all. It has nothing to do
with font size, or any other aspect of how the headings look -- just a
feeling of uneasiness over some case studies being afforded a higher level
than others.

Imagine a summarising program that took a document's structure from its
headings, and allowed you to generate an even shorter summary from
trimming this heading tree down to just H1-H3. Imagine the difference
between the resultant precis using each of the two heading models
discussed here.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 11 '07 #11
Scripsit Toby A Inkster:
For example

<h1= Document heading
<h2= Chapter heading
<h3= Subchapter heading
<h4= Heading for a "Case Study"
Fine.
where case studies may appear within either a chapter or a
subchapter.
Then the division into chapters and subchapters has been made inadequately
and should be fixed. The document structure is not balanced if some chapters
contain subchapters and some don't.
For purposes of consistency, it may be considered
preferable to have all case studies at the same heading level.
But in your example, they would not be at the same heading level. If a case
study appears after a 2nd level heading without an intervening heading, it
is at heading level 3. Using markup that claims it to be at level 4 would be
semantically wrong.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 11 '07 #12
On Wed, 11 Apr 2007 22:09:12 +0300, Jukka K. Korpela put finger to
keyboard and typed:
>Scripsit Toby A Inkster:
>For example

<h1= Document heading
<h2= Chapter heading
<h3= Subchapter heading
<h4= Heading for a "Case Study"

Fine.
>where case studies may appear within either a chapter or a
subchapter.

Then the division into chapters and subchapters has been made inadequately
and should be fixed. The document structure is not balanced if some chapters
contain subchapters and some don't.
Why? Real life isn't necesarily that neat. If a document relates to a
real life situation, then there are quite likely to be cases where
some chapters require subchapters and some don't.
>For purposes of consistency, it may be considered
preferable to have all case studies at the same heading level.

But in your example, they would not be at the same heading level. If a case
study appears after a 2nd level heading without an intervening heading, it
is at heading level 3. Using markup that claims it to be at level 4 would be
semantically wrong.
It's level 4 with respect to the document as a whole, even if it isn't
with respect to that particular page of the document.

Mark
--
Visit: http://www.CorporateContact.info - phone and email contacts for Amazon, Paypal, eBay and lots of other hard-to-contact organisations
"A sky isn't always blue, a sun doesn't always shine. It's alright to fall apart sometimes"
Apr 11 '07 #13
Scripsit Mark Goodge:
>Then the division into chapters and subchapters has been made
inadequately and should be fixed. The document structure is not
balanced if some chapters contain subchapters and some don't.

Why? Real life isn't necesarily that neat. If a document relates to a
real life situation, then there are quite likely to be cases where
some chapters require subchapters and some don't.
Strangely enough, no real life case has been cited in this discussion. An
example of a page where one needs to skip heading levels might be an
interesting challenge, though probably an easy one, to anyone who wants to
refute the need.

Real life (which probably spells "pointy-haired boss" here) might prevent
the author from structuring a document properly, but this does not mean that
the resulting markup would be adequate. If you have been forced into using
illogical markup, I won't blame you, as long as you're not trying to present
it as a virtue.
It's level 4 with respect to the document as a whole, even if it isn't
with respect to that particular page of the document.
There's no level 4 in that respect, since heading levels only exist in
relation with the implied logical nesting of parts of a document. If level 4
heading does not mean a heading for something that is nested inside
something at level 3 etc., what _does_ it mean?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 11 '07 #14
On 2007-04-11, Jukka K. Korpela <jk******@cs.tu t.fiwrote:
Scripsit Mark Goodge:
>>Then the division into chapters and subchapters has been made
inadequatel y and should be fixed. The document structure is not
balanced if some chapters contain subchapters and some don't.

Why? Real life isn't necesarily that neat. If a document relates to a
real life situation, then there are quite likely to be cases where
some chapters require subchapters and some don't.

Strangely enough, no real life case has been cited in this discussion. An
example of a page where one needs to skip heading levels might be an
interesting challenge, though probably an easy one, to anyone who wants to
refute the need.

Real life (which probably spells "pointy-haired boss" here) might prevent
the author from structuring a document properly, but this does not mean that
the resulting markup would be adequate. If you have been forced into using
illogical markup, I won't blame you, as long as you're not trying to present
it as a virtue.
>It's level 4 with respect to the document as a whole, even if it isn't
with respect to that particular page of the document.

There's no level 4 in that respect, since heading levels only exist in
relation with the implied logical nesting of parts of a document. If level 4
heading does not mean a heading for something that is nested inside
something at level 3 etc., what _does_ it mean?
It could mean "an item of merely quaternary importance". If so then
there's no need to nest headings properly-- my whole document might only
deal with items of quaternary importance. The ranking is in relation to
other things generally, not restricted to the contents of this document.

This is how to make sense of Toby's point I think-- "Case Studies" are
all of the same general importance regardless of how the document is
structured.

This seems a reasonable way to understand the meaning of <h1>, <h2>,
<h3>. The alternative is to use classes, and keep heading levels for
nesting, so:

<h3 class="notVeryI nteresting">Cas e Studies</h3>

for example. Then I can put a veryImportant section inside a
notVeryInterest ing section and still get a hierarchical TOC.
Apr 11 '07 #15
Toby A Inkster wrote::
>For example

<h1= Document heading
<h2= Chapter heading
<h3= Subchapter heading
<h4= Heading for a "Case Study"

where case studies may appear within either a chapter or a
subchapter.
Jukka K. Korpela <jk******@cs.tu t.fiwrote:
But in your example, they would not be at the same heading level. If a case
study appears after a 2nd level heading without an intervening heading, it
is at heading level 3. Using markup that claims it to be at level 4 would be
semantically wrong.
That depends on what you think the underlying structure is.

I think the underlying structure is document heading, chapter heading,
subchapter heading, case study heading, etc. However, HTML does not include
elements for these types of heading, so somehow we have to map HTML's H1-H6
headings to the underlying structure.

It seems that you think it's more consistent to preserve the hierarchy of
HTML's H1-H6 headings and to use class="caseStud y" to identify the case
study headings. Others of us think it's more consistent to use HTML's H4
heading consistently for case study headings.

To me, the class="caseStud y" approach is too close to div soup.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"If you aren't part of the solution, then you are part of the precipitate."
Apr 11 '07 #16
On Thu, 12 Apr 2007 00:08:11 +0300, Jukka K. Korpela put finger to
keyboard and typed:
>Scripsit Mark Goodge:
>>Then the division into chapters and subchapters has been made
inadequatel y and should be fixed. The document structure is not
balanced if some chapters contain subchapters and some don't.

Why? Real life isn't necesarily that neat. If a document relates to a
real life situation, then there are quite likely to be cases where
some chapters require subchapters and some don't.

Strangely enough, no real life case has been cited in this discussion. An
example of a page where one needs to skip heading levels might be an
interesting challenge, though probably an easy one, to anyone who wants to
refute the need.
You're right, it is easy. Consider, for example, a product catalogue
of parts:

Level 1 - manufacturer name
Level 2 - product name
Level 3 - product variant
Level 4 - part name/number

For a product which has multiple variants or models, level 3 will be
needed. Where a product only has one model, level 3 will be
superfluous.

Or consider a tourist guide to various towns and cities:

Level 1 - name of region
Level 2 - name of city
Level 3 - subdivision of city
Level 4 - individual tourist attraction

Small towns and cities probably won't need subdividing. You can fit
all the attractions in my howetown on to one page! But if the city is
London or Berlin, then subdividing by map sector makes sense.
>Real life (which probably spells "pointy-haired boss" here) might prevent
the author from structuring a document properly, but this does not mean that
the resulting markup would be adequate. If you have been forced into using
illogical markup, I won't blame you, as long as you're not trying to present
it as a virtue.
It isn't illogical to structure a document by reference to the data it
contains. It's illogical to force a unified structure onto a document
if the data it contains isn't that consistent.
>It's level 4 with respect to the document as a whole, even if it isn't
with respect to that particular page of the document.

There's no level 4 in that respect, since heading levels only exist in
relation with the implied logical nesting of parts of a document. If level 4
heading does not mean a heading for something that is nested inside
something at level 3 etc., what _does_ it mean?
Levels don't necessarily imply nesting. They imply status - a level 4
section on one page is equivalent in status to a level 4 section on
another page, even if the first page has a level 3 section and the
second page does not.

Mark
--
Blog: http://mark.goodge.co.uk Photos: http://www.goodge.co.uk
"My shallow heart's the only thing that's beating"
Apr 12 '07 #17
Scripsit Darin McGrew:
Jukka K. Korpela <jk******@cs.tu t.fiwrote:
>But in your example, they would not be at the same heading level. If
a case study appears after a 2nd level heading without an
intervening heading, it is at heading level 3. Using markup that
claims it to be at level 4 would be semantically wrong.

That depends on what you think the underlying structure is.
The HTML heading elements express a nesting structure. This doesn't depend
on what I think. I would not have designed a markup language that way, but I
can live with other people's design.
I think the underlying structure is document heading, chapter heading,
subchapter heading, case study heading, etc.
You can call 2nd level parts chapters and 3rd level parts subchapters; that
would match one particular way of naming parts of a document. This is
immaterial, however, since the HTML elements are independent of such naming.
If "case study heading" is supposed to mean a heading for a case study,
wherever it appears in a document's nesting structure, then it's simply
something that is not expressible in HTML.
However, HTML does not
include elements for these types of heading, so somehow we have to
map HTML's H1-H6 headings to the underlying structure.
The point is that the document should be structured so that comparable
parts, such as case studies, are at the same level of nesting, so that the
mapping is self-evident.
It seems that you think it's more consistent to preserve the
hierarchy of HTML's H1-H6 headings and to use class="caseStud y" to
identify the case study headings.
No, I didn't say so and I didn't think so. If you have decided to structure
a document so that comparable parts appear at different levels of nesting, I
will abstain from saying which markup you should use.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 12 '07 #18
On 2007-04-12, Jukka K. Korpela <jk******@cs.tu t.fiwrote:
Scripsit Darin McGrew:
>Jukka K. Korpela <jk******@cs.tu t.fiwrote:
>>But in your example, they would not be at the same heading level. If
a case study appears after a 2nd level heading without an
intervening heading, it is at heading level 3. Using markup that
claims it to be at level 4 would be semantically wrong.

That depends on what you think the underlying structure is.

The HTML heading elements express a nesting structure. This doesn't depend
on what I think. I would not have designed a markup language that way, but I
can live with other people's design.
Are you sure? The HTML specification says,

"There are six levels of headings in HTML with H1 as the most
important and H6 as the least. Visual browsers usually render more
important headings in larger fonts than less important ones."

And then remarks:

"Some people consider skipping heading levels to be bad practice. They
accept H1 H2 H1 while they do not accept H1 H3 H1 since the heading
level H2 is skipped."

It doesn't say for example, "Numbered headings denote nesting levels of
sections within a document, *not* the relative importances of each
section".

It seems the primary meaning is level of importance, and as you suggest,
that may be isomorphic with nesting level in many documents. But it is
not necessarily so.

[...]
>However, HTML does not
include elements for these types of heading, so somehow we have to
map HTML's H1-H6 headings to the underlying structure.

The point is that the document should be structured so that comparable
parts, such as case studies, are at the same level of nesting, so that the
mapping is self-evident.
Why?
>It seems that you think it's more consistent to preserve the
hierarchy of HTML's H1-H6 headings and to use class="caseStud y" to
identify the case study headings.

No, I didn't say so and I didn't think so. If you have decided to structure
a document so that comparable parts appear at different levels of nesting, I
will abstain from saying which markup you should use.
Fair enough.
Apr 12 '07 #19
Jukka K. Korpela wrote:
Strangely enough, no real life case has been cited in this discussion. An
example of a page where one needs to skip heading levels might be an
interesting challenge, though probably an easy one, to anyone who wants to
refute the need.
Here's a book for you: Watt & Brown "Programmin g Language Processors in
Java". (Good book by the way.) It's structured into chapters, subchapters,
sub-subchapters and examples. Although all chapters have subchapters, not
all subchapters have sub-subchapters. Imagine typing this document up
into an HTML document. Using the structure for which I've been arguing,
you'd have:

<h1= Book heading
<h2= Chapter heading
<h3= Subchapter heading
<h4= Sub-subchapter heading
<h5= Example heading

If you wanted to pull out a table of contents, not listing examples, then
it would be a simple matter of pulling out <h1-4>.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 12 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1662
by: dayzman | last post by:
Hi, I'm interested in a program that extracts the structure of unstructured HTML documents. The program should be able to make good estimates about different font styles used to represent headings, for example, some may use <font size = 24> for headings and some may use <h1>, in the end, both should output the same structure. The output can be in XML or other formats. Manual driving should remain minimal. Does anyone know of such...
71
6507
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's a step beyond Notepad (not a WYSIWYG tool). Thanks.
26
2449
by: Dave Patton | last post by:
http://members.shaw.ca/davepatton/gps.html In another newsgroup(related to GPS), in regards to the above page, someone said: ---------------------------------------------------------------------- That page has quite a cryptic title: "CIS: GPS". I saved the URL in my browser but changed the title to "Patton's GPS pages". The headings are rather haphazard. For example, the first one ("On This Page") is a third level heading (an <h3>),...
10
2190
by: st4 | last post by:
Help, As part of my family history web site i need to get 150 pages of typed text into some format to display. It just text right now but I would like to add some graphics (photos) and make the text more friendly to read. I am thinking to divide it into smaller chapters and to format it something like a newspaper article. But just learning about HTML, 150 pages just seems like too greater task. Is there a shortcut or another way to do...
3
1667
by: dayzman | last post by:
Hi, I'm interested in projects evolve about extracing semantic structure of HTML documents. What I mean by extracting semantic structure is to analyse HTML doc and outputs a model (perhaps a tree structure) that relates paragraphs to headings/sub headings. It should be a difficult problem, since HTML is a structure language. Does anyone know of any existing research? Cheers,
8
2408
by: mark126 | last post by:
If this is not the right group for this question, please advise me of a better one. I have a collection of simple HTML files, many of which just contain a paragraph or two of text. Some contain just an IMG and a one line caption. I would like to find a tool that will load the first page (call it toc.html) and anywhere it finds a link, it should replace the link with the BODY of the linked page. If that BODY contains further links, it...
9
1510
by: elia | last post by:
Hello, I would like to show a line in a tabel in html if there is quantity of article choosed. My code is: <? if ($quantite1 0) { echo(' <tr>
27
3831
by: prt7u | last post by:
Howdy, I've started back afte a very long time of working with web pages for an organization that I am affiliated with (personally not professionally). Seeing that technology has advanced a lot since the last time I authored web pages (using vi), I am looking for a good, "free" WYSIWYG HTML Editor. Now, before ya go and hit the reply key, I've already tinkered with "amaya" which was pretty cool and then I moved to "Nvu", which I like
1
1705
by: Izhaki | last post by:
Hi, I'm creating a system where my XML includes HTML tags (<h1></h1>) in addition to other XML elements (<book></book>). I would like to render the HTML tags back to HTML using XSL. Considering I want to replace all headings, I could do for each heading level (i.e. repeat the following code for h2, h3, h4, h5, etc.): <xsl:template match="h1"> <h1><xsl:apply-templates/></h1> </xsl:template>
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.