...

View Full Version : How to Italic individual words



vinoman2
11-18-2008, 02:14 AM
How do you create a style to italic individual words?

on this site: www.fatcitycafe.net
I have words like the Willamette Week, which is a publication that I want to italicize.

GardenGnome2
11-18-2008, 02:24 AM
<style type="text/css">

.i { font-style:italic

}

</style>

<p class="i">Text</p>

Add class="i" for each word you want to italicize.



A simpler solution, however, would be to add <i> tags around text.


<i>Text</i>

vinoman2
11-18-2008, 03:10 AM
I didn't know that <i> tags were still used. That did the trick. :)

rangana
11-18-2008, 03:53 AM
Use the structural tag em instead of the formatting tag <i>:


<em>I'm italized and at the same time, and I receive a special attention from the spiders</em>


For further reading:
http://www.netmechanic.com/news/vol6/html_no12.htm

jlhaslip
11-18-2008, 04:42 AM
If it is a "citation", <cite> might also work to do that, depending on the semantics involved.
http://dev.opera.com/articles/view/21-lesser-known-semantic-elements/#citations


Or use a <span class="some_class" > </span> and set the styles as per #2 above for the .some_class



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum