Is there a way to style the first word in tag differently than the other words in that tag? For example, say I had this snippet of code:
<h4>Worpress Quick Tip Of The Week</h4>
Is there way I could style the word "Wordpress" differently than the other words using css? I know I could just put a span with a unique class around the word Wordpress, but is it possible without doing that?
Thanks
shreesh chandra shukla
19-Aug-2013There is no :first-word selector unfortunately. You can take a look at this script though that implements it by adding the firstWord class to, well, the first word.
span.firstWord {
font-weight:bold;
text-decoration: underline;
}