How to define marked/highlighted text using HTML?
Last Updated : 01 Jul, 2024
Improve
To define highlighted or marked text in HTML5, the <mark> tag is employed. It effectively highlights specific text within a paragraph, offering a straightforward way to visually emphasize content. Introduced in HTML5, the `<mark>` tag enhances readability and focus within web content.
Syntax:
<mark> Contents... </mark>
Examples: The example below shows how to define marked/highlighted text using HTML5 using <mark> element.
<!DOCTYPE html>
<html>
<body>
<h2>HTML mark Tag</h2>
<p>
<mark>GeeksforGeeks:</mark> It is a
<mark>computer science</mark> portal for geeks
</p>
</body>
</html>
Output:
