Welcome Guest, Not a member yet? Register   Sign In
Using CSS to underline/bold/italicize one word within a paragraph
#9

[eluser]slowgary[/eluser]
kthxbai2u,

As long as your XHTML and your CSS both validate then your page is compliant with both standards. CSS validators don't know or care which tags you've used, and the <em>, <u>, <strong>, <b>, <i> tags I believe are all valid XHTML.

While you can use the <span> tag with inline styles to achieve the visual effect you're looking for, using the actual tags is more semantic and considered to be the better approach. One of the main goals of CSS is to make your markup less cluttered and more accessible to users with disabilities, and using the above mentioned tags makes your content more accessible. There's a higher chance that a screen reader for blind users will be able to understand and emphasize text within the <em> tag than if it's wrapped in a generic <span> tag with inline styles.

Also, take insulting replies with a grain of salt. Everyone learns by asking questions.


Messages In This Thread
Using CSS to underline/bold/italicize one word within a paragraph - by El Forum - 06-28-2009, 10:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB