[thelist] Question about proper tag

Kelly Hallman khallman at wrack.org
Mon Aug 25 23:59:19 CDT 2003

On Mon, 25 Aug 2003, Diane Soini wrote:
> ...use list markup for it to continue being semantically correct. ...if
> I do that: <ul><li><h1><a href="">text</a></h1></li> etc... the <h*>
> tags have too much space above and below. I can, of course, set the
> margins to 0 in the css, but I really hate having to force the natural
> structure of an element to be dramatically different. Of course I style
> things, but I try to stay away from the styles being crucial to the
> usability. I guess there isn't any way around it, though.

I don't know if changing the margins is a drastic alteration. Seems it
would only effect the usability if you were to do something unintuitive
like make h1 really small and h5 really big.

If you like the idea of semantic HTML, styling built-in elements seems
like a natural thing to do. The alternative, creating a pseudo-markup
language by using many custom class definitions attatched to a myriad of
divs, seems like the non-semantic way.

In your case of the list element headings, you could use css selector:
li h1 { } to only style h1's within a list element. You probably knew, but 
maybe that makes you feel better than styling h1's across the board.

As for the predefined styles of HTML elements such as h1; you can think of
their default styles as a basic stylesheet that you are overriding. I'm
not sure there is any correctness to the those styles other than
historically, and that they are logical for content not styled..

Kelly Hallman

More information about the thelist mailing list