How to highlight text on the page | Using CSS


How to highlight text on the page | Using CSS

To highlight important text on the page just wrap that important text with the a <span> class
and add CSS rules to that span class .


here is an example:

<p>Summer is to hot in India, so people travel to <span class=”highlight”>hill stations</span> and other cooler regions in India to beat the heat and chill</p>

CSS code to highlight the text:
.highlight{ background-color:yellow;}


Comments

Check out

CSS Sprites | What are They?

Login form | Using CSS3

Remove Scrollbars from syntaxhighlighter

Adding a button in HTML | styling a button

HTML5 Semantic Tags | What do they mean

How to remove plus and minus characters from input type number

HTML5 | LocalStorage

How CSS3 Works

jQuery Resources | Support and tutorial help