Adam Adam - 1 year ago 332
CSS Question

css bold first word

How can I bold the first word of sentence using CSS selectors and is this a good/bad way to do this with respects to browser comparability?


<h2>this is a sentence</h2>


Answer Source

There is no ::first-word pseudo-element in CSS; you'll have to wrap the first word in an extra element and then select that.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download