CSS class, or HTML tag? Oct29 '04

Feedback

# (1 of 4): Joshua Street » joahua.com

1 hour, 17 minutes after the fact. (Fri 29 Oct 2004, 7:43 PM CST)

DEFINITELY HTML tags!

I'm using a User Agent which doesn't support styles (or, I've chosen to disable them, or something). I load your website, and what would have used to have been a header displays like any other normal text.

If that's acceptable, then you shouldn't have been using headers to start with (because that would mean they were never intended to function as headers, but instead as simple styling devices for text with no STRUCTURAL meaning -- what semantics is all about).

So, consider the semantics of header tags (they're designed to create structure in a document, as with all headers), then consider what a website would look like (and structure like) if styles went and jumped overboard, or the website was being read aloud by a screen reader.

Additionally, there're search engines to consider: content in headers (within reason) is given greater weight than normal text -- if your "headers" aren't semantically headers, and just styled text, then search engines (which don't care about style sheets!) aren't going to index your content as well as they could, and your ranking will reflect poorly because of that...

Josh.

# (2 of 4): Matthom

14 hours, 17 minutes after the fact. (Sat 30 Oct 2004, 8:43 AM CST)

Josh, I agree with your ideas.

But, something bothers me when I have a GROUP of lists, and I use HTML header tags for each. I just don't see how - semantically speaking - each header tag applies DIRECTLY to each list.

It almost makes more sense to include each header WITHIN each list, but that is not possible with header tags.

Don't get me wrong. All your points are correct, and they make sense. I'm just kind of curious, is all.

Previous comment Return to entry

# (3 of 4): Josh » joahua.com

1 day, 4 hours after the fact. (Sat 30 Oct 2004, 10:36 PM CST)

Okay, fair enough... I see your point. I think you're wanting to be able to tangibly LINK elements, like using label tags for form controls. Whilst this is good where it's applicable, think about your webpage as though it were a text document (because, more often than not, that's what it is)

TITLE
Heading 1
Heading 1.1
 Heading 1.1.1
  List goes here.
Heading 2, etc.

Logical structure exists, and the reader may safely *assume* (unless the list has a legend or caption below it directly associating it with something, in which case they *know*) that the list falls under the content section 1.1.1

I see what you want (I kinda do, too!), but there aren't really facilities to deal with it (so far as I'm aware) in our current markup. At any rate, it's not 100% necessary, given logical document flow would dictate a connection, anyway.

My $AU0.02 ;)

Previous comment Return to entry

# (4 of 4): Matthom

1 day, 13 hours after the fact. (Sun 31 Oct 2004, 7:05 AM CST)

I suppose what I'm really looking for is a "list header," much like a table header.

The table header would be <th>. So... I guess I'm looking for <lh>, which obviously doesn't exist.

You're right about the document flow. The headers would dictate the next item in the document, and that's natural for the reader/viewer.

Previous comment Return to entry

RSS feed for comments on this post

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

Return to entry.

matthom is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.

Contact Matt

When working with HTML lists, is it more semantically correct to use header tags, or a CSS class, within the list?

You are at the feedback permalink page for: CSS class, or HTML tag?

Read more...