how to apply different css styles to different part of sentence?

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

asp.net 3.5

I'm wonerig how to apply css settings to a sentence, where individual words
must have different styling?

Lets say this sentence:
"Hey, I got much to learn about css!"

In the above sentence the word Hey, should have font-weight:bolder;
font-size:12px;
"much to learn" font-size:10
"css" should be in red color font-size:14px;

any ideas?
 
Put the text within a <span></span> tag. Span can be assigned a CSS style
and keeps the text inline with the surrounding text.
 
I'm wonerig how to apply css settings to a sentence, where individual
words must have different styling?

Lets say this sentence:
"Hey, I got much to learn about css!"

In the above sentence the word Hey, should have font-weight:bolder;
font-size:12px;
"much to learn" font-size:10
"css" should be in red color font-size:14px;

any ideas?

<span style="font-size: 12px; font-weight: bold">Hey</span>
<span style="font-size: 10px">, I got much to learn about</span>
<span style="color: red; font-size: 14px"> CSS!</span>

John
 
Back
Top