Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different formatting within same paragraph

Status
Not open for further replies.

elmiocid

Technical User
Jul 29, 2007
22
0
0
ES

Hi, I´m trying to format one word, within a paragraph, differently from the rest of the words,like so

<p class="pShade">My text here</p>

if I want to make the word 'My' to appear red, I cant think of a way to do it without breaking the paragraph... I've tried things like this

<p class="pShade" color="red">My</p><p class="pShade"></p></p>
but, how am I not surprised, it doesnt work

I'm sure it's simple and staring me in the face... perhaps too many hours coding... need a break... go to get that cuppa...

Cheers all

elmiocid

I
 
Code:
<p class="pShade"><span>My</span> text here</p>
<p class="pShade"><strong>My</strong> text here</p>
<p class="pShade"><em>My</em> text here</p>
These are some options to highlight one word in a paragraph. You can use css to style each element the way you want it to look.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 

Of course, it worked with <span style...>

Thanks for that.. I knew the cuppa on its own would't work!

Back to coding smooth

Take care

elmiocid

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top