This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > November 2005 > HTML horizontal rule element
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
HTML horizontal rule element
|
|
| lothar 2005-11-10, 7:00 pm |
| for the horizontal rule element, the w3c HTML 4.01 specification
http://www.w3.org/TR/html4/cover.html
states that the align, noshade, size and width attributes are deprecated.
it gives an example using the deprecated attributes, but no indication as to
how to avoid the deprecated attributes.
what CSS properties can be used to replace the hr tag noshade and size
attributes?
in my experiments with Internet Explorer 6.0, the border and padding CSS
properties have no effect.
| |
| Stan Brown 2005-11-10, 7:00 pm |
| Thu, 10 Nov 2005 19:54:33 -0000 from lothar <lothar@ultimathule.nul>:
> for the horizontal rule element, the w3c HTML 4.01 specification
>
> http://www.w3.org/TR/html4/cover.html
Why not give the actual URL
<http://www.w3.org/TR/html4/present/...cs.html#edef-HR> instead of
a generic cover page?
> states that the align, noshade, size and width attributes are deprecated.
>
> it gives an example using the deprecated attributes, but no indication as to
> how to avoid the deprecated attributes.
>
> what CSS properties can be used to replace the hr tag noshade and size
> attributes?
size --> height
I'm not sure about noshade, because I've never used it. But the
suggested default style sheet at
<http://www.w3.org/TR/CSS21/sample.html> has
hr { border: 1px inset }
which presumably is what you get without noshade, so that should give
you a starting point.
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/20...e_wont_help_you
| |
| Spartanicus 2005-11-10, 7:00 pm |
| "lothar" <lothar@ultimathule.nul> wrote:
>for the horizontal rule element, the w3c HTML 4.01 specification
>
>http://www.w3.org/TR/html4/cover.html
>
>states that the align, noshade, size and width attributes are deprecated.
>
>it gives an example using the deprecated attributes, but no indication as to
>how to avoid the deprecated attributes.
First establish if you are using the element correctly, there are few
proper usages of this bizarre element. It should not be used to create a
line on screen, but only to markup a division between content when there
is no better markup to do that.
>what CSS properties can be used to replace the hr tag noshade and size
>attributes?
>
>in my experiments with Internet Explorer 6.0, the border and padding CSS
>properties have no effect.
IE only allows limited styling of the <hr> element. Browsers in general
can use various ways to draw the element, they may use borders or they
may treat it as content on which for example the color and height
properties work.
--
Spartanicus
| |
| Jim Moe 2005-11-10, 7:00 pm |
| lothar wrote:
> for the horizontal rule element, the w3c HTML 4.01 specification
> http://www.w3.org/TR/html4/cover.html
> states that the align, noshade, size and width attributes are deprecated.
>
noshade => { border: 0; }
size => { height: Xpx; }
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
| |
| Andy Dingley 2005-11-10, 7:00 pm |
| On Thu, 10 Nov 2005 21:18:57 GMT, Spartanicus <invalid@invalid.invalid>
wrote:
<hr>
>there are few
>proper usages of this bizarre element. It should not be used to create a
>line on screen, but only to markup a division between content when there
>is no better markup to do that.
Bollocks. Horizontal rules have typographical precednt for centuries.
Better an explicit element to represent them in the HTML than some
bizarre and inflexible coupling in CSS between an unconnected element
and its bottom border.
| |
| Safalra 2005-11-11, 7:19 pm |
| On Thu, 10 Nov 2005 23:49:30 +0000, Andy Dingley wrote:
> On Thu, 10 Nov 2005 21:18:57 GMT, Spartanicus <invalid@invalid.invalid>
> wrote:
>
> <hr>
>
>
> Bollocks. Horizontal rules have typographical precednt for centuries.
> Better an explicit element to represent them in the HTML than some
> bizarre and inflexible coupling in CSS between an unconnected element
> and its bottom border.
HTML is meant to represent the logical structure of the document, and a
horizontal rule is an explicit presentational representation of a logical
division. Unfortunately HTML markup in this area is rather lacking, but
surrounding the block of text with a div and setting its border-bottom
property seems The Right Thing to do. (In an ideal world CSS would allow
compound and other complex borders, which would allow you to immitate the
exact appearance of the <hr> element in your chosen browser.)
--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/
| |
| Alan J. Flavell 2005-11-11, 7:19 pm |
| On Thu, 10 Nov 2005, Andy Dingley wrote:
> Bollocks. Horizontal rules have typographical precednt for centuries.
I don't think anyone's arguing with that. But typography is
"presentation", and in current web practice, presentation is supposed
to be a matter for the stylesheet. What does a horizontal rule sound
like on a speaking browser?
The typography is *supposed* to represent some abstract structural
feature of the content. In this case, it's presumably meant to be a
stronger break than a mere paragraph, or than the kind of section
which would be delimited by <hN> elements for some value of N.
> Better an explicit element to represent them in the HTML than some
> bizarre and inflexible coupling in CSS between an unconnected element
> and its bottom border.
Well, we have to make do the best we can with the HTML that we've got,
indeed. That doesn't stop us from proposing a style for the elements
that it's got. I would be inclined to quote Spartanicus and to agree
with what he said, but I've already been given a red card for trying
to do that in the past, so I'll just pretend I hadn't seen that.
best regards
| |
| Andy Dingley 2005-11-14, 10:32 pm |
| On Fri, 11 Nov 2005 12:13:38 +0000, "Alan J. Flavell"
<flavell@ph.gla.ac.uk> wrote:
>But typography is
>"presentation", and in current web practice, presentation is supposed
>to be a matter for the stylesheet.
That's an article of faith hereabouts. HTML is for content, CSS is for
presentation and ne'er the twain shall meet.
However the reality is that this doesn't entirely work. HTML is
inadequately expressive to present a truly presentation-free
representation of content. You can't transparently communicate "<foo> is
a date in an English format, please present it as such" and so HTML must
be pre-processed into an almost "finished" textual representation of
what's required as the final content.
At the same time, CSS is also inadequate to express all the
"presentation" that can be required. It can "presentationally annotate"
the supplied content, but it's (almost) incapable of generating any
arbitrary output, no matter how trivial the eye-candy. We see this most
obviously with XML - XML+CSS can't generate a menu, or a duplicated
header and footer, in a way that's easy with XML+XSLT. When used with
HTML we can do this easily, but only by processing such "trivia" into
the HTML beforehand.
So compared to a pure "content" format like DocBook or similar, HTML
must be used in a manner that's already somewhat
presentationally-formatted. Compared to XSL:FO, CSS is limited and needs
assistance from the HTML document. This is no excuse of layout tables
(that's mis-using one feature instead of using the correct feature), but
it is a justification for putting things into the HTML when there
_is_no_ truly viable pure CSS alternative, even if these aren't strictly
"content".
<hr> is such an element. Typographically the vertical margins around a
rule should collapse according to the usual behaviour, with the rule
regarded as an element between adjacent paragraphs, not the paragraphs
seen as abutting each other. This is just one example of why the <hr>
belongs in the HTML.
>Well, we have to make do the best we can with the HTML that we've got,
>indeed.
We have to make do with the HTML we can have, not try to needlessly
limit ourselves to a subset of permitted HTML in pursuit of some
unattainable and unimportant target.
> What does a horizontal rule sound
>like on a speaking browser?
That's a matter for the browser to work out for itself. I'm sure it can
do something useful, or at least avoid doing soemthing harmful.
--
Cats have nine lives, which is why they rarely post to Usenet.
| |
| Garmt de Vries 2005-11-15, 3:40 am |
|
Alan J. Flavell wrote:
> What does a horizontal rule sound like on a speaking browser?
Like one of those tunes between different items on the news?
--
Garmt de Vries.
| |
| Alan J. Flavell 2005-11-16, 10:26 pm |
| On Tue, 15 Nov 2005, Andy Dingley wrote:
> On Fri, 11 Nov 2005 12:13:38 +0000, "Alan J. Flavell"
> <flavell@ph.gla.ac.uk> wrote:
>
>
> That's an article of faith hereabouts.
The way that I see it, the reality of the web is that it *will*
separate presentation and content, whether one likes it or not.
The idea of separating HTML and CSS is that it goes some way to
codifying what's going to happen anyway, and thus helps us to
cope with the situation. But the borders are fuzzy.
> However the reality is that this doesn't entirely work. HTML is
> inadequately expressive to present a truly presentation-free
> representation of content.
Indeed. But I think you're arguing tangentially to what I was trying
to get at.
> <hr> is such an element. Typographically the vertical margins
> around a rule should collapse according to the usual behaviour, with
> the rule regarded as an element between adjacent paragraphs, not the
> paragraphs seen as abutting each other. This is just one example of
> why the <hr> belongs in the HTML.
[...]
>
> That's a matter for the browser to work out for itself.
If <hr> really *was* a purely typographical element, then it could
have no useful representation on a speaking browser. What must surely
underly what *you* are saying here, is that <hr> is really standing
for some abstract structure - a section break, or something like that
- whose conventional typographical representation is a horizontal
rule, but which in other presentational situations could be
meaningfully represented by some other rendering. As such, the <hr>
is a bit of a misnomer.
> I'm sure it can do something useful,
Of course it can, but only if we agree that the horizontal rule itself
is not the "true nature" of the abstract structure - it's only one
possible rendering of it.
| |
| Andy Dingley 2005-11-17, 10:26 pm |
| On Thu, 17 Nov 2005 01:50:06 +0000, "Alan J. Flavell"
<flavell@ph.gla.ac.uk> wrote:
>- whose conventional typographical representation is a horizontal
>rule, but which in other presentational situations could be
>meaningfully represented by some other rendering. As such, the <hr>
>is a bit of a misnomer.
Well if that's the core of your original point, then I missed it
entirely.
However we have to call it _something_. It's also pretty opaque what it
is called - it could just as well be <boojum> and it wouldn't even be
visible outside of the DTD, some internal code and the design tool.
However arguing over the precise name to not offend the speech browser
community is likely to be a long exercise in futility that replaces a
name that's usefully relevant to half the audience by one that's equally
useless to all.
I'd even be happy to replace it with <br classs="give-me-a-rule" >, I
just don't want to lose it entirely and have browsers try to infer it
completely from the types and sub-classing of two adjacent elements.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|