CSS White Space - margin and padding question

T

Toby A Inkster

dorayme said:
unstated h1. (I think that possibility is what Toby was implying
by his h1 {display: none}".

I meant to imply that the h1 is there for semantic and structural reasons,
but CSS is used to hide it.

It may be that the main heading is obvious to all who come to the page, so
there is no benefit in showing it to the visitor, yet I still think there
should be a main heading, even if you hide it with CSS for those reasons.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 12 days, 6:20.]

USD/EUR Exchange Rate Graph
http://tobyinkster.co.uk/blog/2007/11/18/usd-eur/
 
D

dorayme

Toby A Inkster said:
I meant to imply that the h1 is there for semantic and structural reasons,
but CSS is used to hide it.

It may be that the main heading is obvious to all who come to the page, so
there is no benefit in showing it to the visitor, yet I still think there
should be a main heading, even if you hide it with CSS for those reasons.

It is something I have been thinking for a while and have now and
then just had h2s or two or more h1s for very separate sections
of a page. I either worried that there was no h1 or too many!

But, of course, you can or should stick it in but not necessarily
display it. Thanks for drawing attention to this possibility.
 
B

Bone Ur

Well bust mah britches and call me cheeky, on Mon, 19 Nov 2007 02:28:43
GMT dorayme scribed:
But, of course, you can or should stick it in but not necessarily
display it. Thanks for drawing attention to this possibility.

No - thank YOU.
 
A

Andy Dingley

Even if headings are supposed to be strictly hierarchical, you could
still have two top level headings in a document

I've not checked this in the standard, but I don't believe so.

Under W3C HTML (the only real sort) there's no restriction on
hierarchy or ordering of <h*> at all. Do whatever you like.

Under the bizarre aberrant ISO HTML (which I intend to ignore rather
than dissecting), the require both strict hierarchies _and_ a single
<h1> as a root.

So it's either very loose, or very strict. There's nothing in the
middle where hierarchy is required but multiple roots are also
permitted.
 
B

Ben C

I've not checked this in the standard, but I don't believe so.

Under W3C HTML (the only real sort) there's no restriction on
hierarchy or ordering of <h*> at all. Do whatever you like.

Under the bizarre aberrant ISO HTML (which I intend to ignore rather
than dissecting), the require both strict hierarchies _and_ a single
<h1> as a root.

Are you sure? From https://www.cs.tcd.ie/15445/15445.html#DTD:

<!ELEMENT BODY - O (%block;|H1|H2|H3|H4|H5|H6)+ +(DEL|INS) >

Doesn't that mean the BODY must contain one _or more_ of a block or a
H#?

So

<body>
<h1></h1>
<h1></h1>
</body>

would be valid.
 
J

Jonathan N. Little

Ben said:
Are you sure? From https://www.cs.tcd.ie/15445/15445.html#DTD:

<!ELEMENT BODY - O (%block;|H1|H2|H3|H4|H5|H6)+ +(DEL|INS) >

Doesn't that mean the BODY must contain one _or more_ of a block or a
H#?

So

<body>
<h1></h1>
<h1></h1>
</body>

would be valid.

Just because the it will parse does not necessary mean that it makes
sense. You could put your address in an ACRONYM element, or your site
navigation links in definition list DT. It can validate as valid HTML
but it wouldn't make semantic sense.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top