ID: 322
Category: HTML
Added: 2nd of October 2022
Views: 1,067
To highlight text on a webpage you can the HTML <mark></mark> tag
Example:
Use the <mark></mark> tag in HTML to highlight text on your webpages.
By default highlighted text will have a yellow background. If you want to change this you just need to add some css to your HTML code, like the example below.
Create a new file on your Desktop named mark.html, copy and paste the code below then save the file. Launch the file in your browser.