HTML mark Tag Explained with Examples
how to use mark tag in html
What is the HTML <mark> Tag.
✷ The <mark> tag in HTML is used to highlight text so that it stands out from the rest of the content. By default, browsers display the marked text with a yellow background, similar to using a highlighter pen.
✷ The syntax of the <mark> tag is simple:
✷ <mark>Highlighted text</mark>
✷ This tag is useful when you want to draw attention to important words, such as search results, keywords, or key points in an article.
✷ For example:<p>This is a <mark>very important</mark> message.</p>
✷ In this example, the words “very important” will appear highlighted, making them easy to notice.
✷ The <mark> tag is an inline element, which means it can be used inside paragraphs, headings, or other text without breaking the layout.
✷ It improves readability and helps users quickly find important information.
✷ Unlike styling with CSS, the <mark> tag also has semantic meaning, indicating that the text is relevant or highlighted for a specific reason.
✷ HTML <mark> tag is use higlight or mark text.<mark> tag is highlighted text useally appears with yellow background in the browser.
✷ This tag is useful when you want to draw attention to important words, such as search results, keywords, or key points in an article.
✷ For example:<p>This is a <mark>very important</mark> message.</p>
✷ In this example, the words “very important” will appear highlighted, making them easy to notice.
✷ The <mark> tag is an inline element, which means it can be used inside paragraphs, headings, or other text without breaking the layout.
✷ It improves readability and helps users quickly find important information.
✷ Unlike styling with CSS, the <mark> tag also has semantic meaning, indicating that the text is relevant or highlighted for a specific reason.
✷ HTML <mark> tag is use higlight or mark text.<mark> tag is highlighted text useally appears with yellow background in the browser.
Syntax:-
<mark>text highlighted </mark>
how to use mark tag in html
Example
<!DOCTYPE html>
<html>
<body>
<h2> how to use mark tag in html</h2>
<p>student learn <mark> HTML </mark> programming language</p>
<p> Student learn <mark>CSS</mark> Programming language</p>
</body>
</html>
how to use mark tag in html
Explain Program
Step 1 ]
<!Doctype html>
<!doctype html> always be the first line of any HTML document.
<!Doctype html>
<!doctype html> always be the first line of any HTML document.
Step 2 ]
<html> and </html>
html is the root element.
<html> and </html>
html is the root element.
Step 3 ]
<body> and </body>
body is main content area.
All visible content inside to the <body> tag
<body> and </body>
body is main content area.
All visible content inside to the <body> tagStep 4]
<h2> how to use mark tag in html</h2>
<h2> display title create second-level heading bold larger text.</h2>
Step 5]
<p>student learn <mark> HTML </mark> programming language</p>
<p> Student learn <mark>CSS</mark> Programming language</p>
<p> defines paragraph of text.
<mark> highlights text with yellow background default.
Step 6]
closing the Tag
</body>
</html>
how to use mark tag in html
Post a Comment