TheFilmGod Posted October 12, 2008 Share Posted October 12, 2008 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! Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/ Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-663486 Share on other sites More sharing options...
waynew Posted October 13, 2008 Share Posted October 13, 2008 You tell em. Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-663759 Share on other sites More sharing options...
TheFilmGod Posted October 13, 2008 Author Share Posted October 13, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664412 Share on other sites More sharing options...
CroNiX Posted October 13, 2008 Share Posted October 13, 2008 I suppose this is a better question to the w3c then? Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664416 Share on other sites More sharing options...
DarkWater Posted October 13, 2008 Share Posted October 13, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664418 Share on other sites More sharing options...
haku Posted October 14, 2008 Share Posted October 14, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664670 Share on other sites More sharing options...
sKunKbad Posted October 14, 2008 Share Posted October 14, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664748 Share on other sites More sharing options...
haku Posted October 14, 2008 Share Posted October 14, 2008 Actually, that's only how browsers do it if you let them. Ya, that's why it's a browser default, as in 'it defaults to this if nothing else is set'. Browser defaults usually end up making these two things bold or italicized Quote Link to comment https://forums.phpfreaks.com/topic/128118-xhtml-standards/#findComment-664758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.