Jump to content

<b> <i> and <u>


shadowayex

Recommended Posts

I use XHTML Strict 1.0 (which, to my knowledge, is the latest thing to use) for all of my pages and I ran into a confusing question.XHTML stresses that you keep formatting out of structure. I was to bold, underline, and italicize bits and pieces of a small informative site I'm building. Are <b>, <i>, and <u> technically correct under XHTML Strict 1.0? I tried using a <span> with styles, but underlining and italicizing isn't working that way. I'm not sure why.If those aren't correct, how would I format little bits (ranging for 1 to 5 word phrases) to be bold, italicized, and/or underlined?

Link to comment
Share on other sites

Guest FirefoxRocks
<span style="font-weight: 800"> bold text </span><span style="font-style: italic"> italicized text</span><span style="text-decoration: underline"> underlined text </span>

If you are trying to emphasize the words, use <em>. It is different than <i> in the way that it is semantically emphasizing the text, not just making it look different.If you are wanting to strongly emphasize something, use <strong>. Again, <strong> is semantically correct, <b> is presentational.<b> and <i> are still acceptable in XHTML 1.0 Strict, <u> has already been deprecated.

Link to comment
Share on other sites

Ok, thank you.One problem though, I tried the span deal with underlining, and it won't work. Not sure why, but it might be Firefox. I'm already having troubles getting it to let me use my own link effect (psuedo classes and whatnot).

Link to comment
Share on other sites

Ok, thank you.One problem though, I tried the span deal with underlining, and it won't work. Not sure why, but it might be Firefox. I'm already having troubles getting it to let me use my own link effect (psuedo classes and whatnot).
It (underlining) is not Firefox. The code FirefoxRocks listed will work.What link effect are you trying to get?
Link to comment
Share on other sites

Guest FirefoxRocks

My example should work perfectly fine.If you are trying to remove the underline from a link, put this in a CSS style sheet:

a:link {	 text-decoration: none;}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...