473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HTML horizontal rule element

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.
Nov 10 '05 #1
10 2932
Thu, 10 Nov 2005 19:54:33 -0000 from lothar <lo****@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/graphics.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/200..._wont_help_you
Nov 10 '05 #2
"lothar" <lo****@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
Nov 10 '05 #3
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)
Nov 10 '05 #4
On Thu, 10 Nov 2005 21:18:57 GMT, Spartanicus <in*****@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.
Nov 11 '05 #5
On Thu, 10 Nov 2005 23:49:30 +0000, Andy Dingley wrote:
On Thu, 10 Nov 2005 21:18:57 GMT, Spartanicus <in*****@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.


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/
Nov 11 '05 #6
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
Nov 11 '05 #7
On Fri, 11 Nov 2005 12:13:38 +0000, "Alan J. Flavell"
<fl*****@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.
Nov 23 '05 #8

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.

Nov 23 '05 #9
On Tue, 15 Nov 2005, Andy Dingley wrote:
On Fri, 11 Nov 2005 12:13:38 +0000, "Alan J. Flavell"
<fl*****@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.


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. [...]
What does a horizontal rule sound like on a speaking browser?


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.

Nov 23 '05 #10
On Thu, 17 Nov 2005 01:50:06 +0000, "Alan J. Flavell"
<fl*****@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.
Nov 23 '05 #11

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

Similar topics

16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
10
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...
15
by: Matthias Hullin | last post by:
Hi, I'm programming some PHP discussion board that is supposed to appear inside the content area of a proprietary CMS. As I need some more styles than the standard stylesheet provides, I just...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
13
by: kw | last post by:
A new html learner is here. Please help. I write a two column web page. Their widths are both fixed. The left one is a menu and the right one is mainly for content display. I pasted a few lines as...
3
by: dotcom | last post by:
hello, i am sending whole javascript code(it is for freezing html header) it works fine eith IE but not firefox scroll bar does not come var divContent = null; var divHeaderRow = null; var...
3
by: phpmel | last post by:
Hi Guys, Can a horizontal rule be visible and not visible within the <td> tag of a row on a table? <tr> <td colspan="4" style="height: 20px; text-align: left" valign="middle"> ...
3
by: phpmel | last post by:
Hi Guys, Can a horizontal rule be visible and not visible within the <td> tag of a row on a table? <tr> <td colspan="4" style="height: 20px; text-align: left" valign="middle"> ...
7
by: milestogofromhere | last post by:
It is late so this is probably something really obvious but I am not seeing it. Can someone please help? Here is the page in question: html - http://www.itsyourplate.com/index2.php css -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.