Jump to content

XHTML Standards


TheFilmGod

Recommended Posts

Can someone explain to me why XHTML does not allow you to use <i> or <u>?

 

I can easily use a span and achieve a "valid XHTML alternate" to those tags, but in my view those tags have a significant amount of meaning - especially in a full text article.

 

Thanks!  ;D

 

Link to comment
Share on other sites

Those are for presentation, not semantics.  You should use <em> for italics and <strong> for bold, and underline should be handled with CSS for proper semantic/presentation separation.

 

Yes, but you are missing the point. There is a fine line between semantics/presentation. I am not talking about using html to style and spice up the looks of a website. Instead, I was wondering why is it against xhtml strict standards to use <i> and <u> when those tags represent a level of importance - signficance - on certain words. For instance, you underline book titles - that is very important in proper English grammar/understanding.

Link to comment
Share on other sites

Those are for presentation, not semantics.  You should use <em> for italics and <strong> for bold, and underline should be handled with CSS for proper semantic/presentation separation.

 

Yes, but you are missing the point. There is a fine line between semantics/presentation. I am not talking about using html to style and spice up the looks of a website. Instead, I was wondering why is it against xhtml strict standards to use <i> and <u> when those tags represent a level of importance - signficance - on certain words. For instance, you underline book titles - that is very important in proper English grammar/understanding.

 

You don't semantically provide italics on a word, you semantically provide emphasis (hence, <em>), etc.

Link to comment
Share on other sites

Yes, but you are missing the point. There is a fine line between semantics/presentation. I am not talking about using html to style and spice up the looks of a website. Instead, I was wondering why is it against xhtml strict standards to use <i> and <u> when those tags represent a level of importance - signficance - on certain words. For instance, you underline book titles - that is very important in proper English grammar/understanding.

 

But underlining a title is visually emphasizing the title. It's markup/presentation. The point with the <em> tag and the <strong> tag, is that they indicate that the content inside is emphasized or stronger than the surrounding words. Browser defaults usually end up making these two things bold or italicized, but that is just how browsers happen to do it. This can be changed to show the emphasis or strength however you want to, and for that matter, you could take away all formatting altogether, and just let the browser know that those elements are strong/emphasized, without even showing the user. Italics and underlines are visual, and they don't mean emphasis themselves, they are just representations of things that are to be emphasized, and hence, should be part of the markup, not the content.

Link to comment
Share on other sites

Browser defaults usually end up making these two things bold or italicized, but that is just how browsers happen to do it.

 

Actually, that's only how browsers do it if you let them. I use a browser reset stylesheet so that the browsers have no control of the style of anything without my say so.

 

The one that I use is:

http://yui.yahooapis.com/2.5.0/build/reset-fonts/reset-fonts.css

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.