From series - Today I learned. There is a tag in HTML that helps us highlight stuff just using it. And too many times I have used
spans with a highlight class, Damn it!
Let's look at what the
mark tag brings in and how to use it.
Just embed mark where you want the highlight and you are good to go.
Where do we use this?
- Do you want to highlight the most relevant parts of a paragraph? Use
- Do you want to highlight the term user searched for? Use
- Want to try syntax highlighting? Don't do
mark, Use a library.
- Want to highlight the most important part in a paragraph? Don't use