polyhedra — 2014-04-06T11:31:37-04:00 — #1
Okay while validating my website I ran into the an error with the hr property "noshade". Is this essentially what
the details of noshade does? I was successfully able to get it to look the same with css
I have included the error from w3 validator seen below:
The noshade attribute on the hr element is obsolete. Use CSS instead. <hr noshade/>
paulob — 2014-04-06T16:02:14-04:00 — #2
Yes noshade is a deprecated presentational attribute and invalid in strict doctypes.
You can use border as you mentioned above to get a similar effect but if you need ie7/6 support then use the following instead.
Note than in older versions of IE you can't reduce the vertical margins on the hr beyond a certain point which is why most people simply use the border on a div instead.
ralphm — 2014-04-06T17:31:15-04:00 — #3
If you are looking for a line for visual styling, I'd suggest using a border on a block element rather than hr. <hr> is not really a presentational element. It has actual meaning in HTML.