Home > DeveloperSection > Forums > How to highlight string in a sentence in HTML.
Allen Scott

Total Post:41

Points:289
Posted on    October-13-2016 2:46 AM

 HTML HTML 
Ratings:


 2 Reply(s)
 697  View(s)
Rate this:
Hi guys

I am beginner in html.Please tell me how to highlight  string in a sentence in HTML.

Thanks


Abhishek Srivasatava
Abhishek Srivasatava

Total Post:24

Points:168
Posted on    October-13-2016 5:34 AM

Hi Allen,

Here is the code for high-lighting the string.


For example:

<!DOCTYPE html>
<html>
<body>
<h2>Mindstick<mark>in Allahabad</mark> </h2>
</body>
</html>



Hubert Jason
Hubert Jason

Total Post:6

Points:42
Posted on    November-07-2016 2:56 AM

In HTML 5 you can use :
<body>
<mark>MindStick</mark> 
<body>

Highlight text with CSS & HTML:
<style>
body { background-color:blue; }
.highlightme { background-color:#FFFF00; }
p { background-color:#FFFFFF; }
</style>





Don't want to miss updates? Please click the below button!

Follow MindStick