Publish in HTML Tutorial el 24/05/2025 17:19
The <mark> element represents text that should be marked or highlighted for reference purposes, typically due to its relevance in another context. It's particularly useful when you want to draw attention to specific portions of text without changing the semantic meaning.
By default, most browsers render <mark> content with a yellow background, but you can customize this with CSS. The <mark> element is an inline element and can be used within paragraphs, lists, or other text containers.
The <mark> element is perfect for:
Simple example of marking important text in a paragraph.
Simulating how search terms might be highlighted in results.
Showing how to customize the appearance of the mark element.
Using JavaScript to dynamically mark text based on user input.
Using JavaScript to toggle highlighting on click.
The <mark> element is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It's also supported in Internet Explorer 9 and later.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...