how to highlight text in html
snippet in html

html highlight text

user1001

For HTML5: (with 'mark' tag)

<p>Do not forget to buy <mark>milk</mark> today.</p> 

In CSS file: (To customize highlight)

mark {
  background-color: yellow;
  color: black;
}

css mark color

user3851

<style>
mark { 
  background-color: yellow;
  color: black;
}
</style>

<mark>Highlighted text!!</mark>

how to highlight text in html

user1974

<mark>text</mark>

how to highlight text in css

user8590

<body>
<p>The Math test is on <mark>Friday</mark>.</p>
</body>