Highlight text with HTML

Hello Everyone
Today, we’ll be discussing about how we can highlight text using html only. You can check it out this video for reference.

The <mark> HTML element represents text which is marked or highlighted for reference or notation purpo…


This content originally appeared on DEV Community and was authored by Rohit Sharma

Hello Everyone
Today, we'll be discussing about how we can highlight text using html only. You can check it out this video for reference.

The <mark> HTML element represents text which is marked or highlighted for reference or notation purposes, due to the marked passage's relevance or importance in the enclosing context.

Let's consider a example

<body>
  <p><mark>Important</mark> things to notice</p>
</body>

The default highlight color is Yellow but we can change it by using CSS.

mark{
  background-color:magenta;
}

Do you know about these html tags <sub> and <sup>. For this check the following video.

You can support my work


This content originally appeared on DEV Community and was authored by Rohit Sharma


Print Share Comment Cite Upload Translate Updates
APA

Rohit Sharma | Sciencx (2021-12-18T16:51:35+00:00) Highlight text with HTML. Retrieved from https://www.scien.cx/2021/12/18/highlight-text-with-html/

MLA
" » Highlight text with HTML." Rohit Sharma | Sciencx - Saturday December 18, 2021, https://www.scien.cx/2021/12/18/highlight-text-with-html/
HARVARD
Rohit Sharma | Sciencx Saturday December 18, 2021 » Highlight text with HTML., viewed ,<https://www.scien.cx/2021/12/18/highlight-text-with-html/>
VANCOUVER
Rohit Sharma | Sciencx - » Highlight text with HTML. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/18/highlight-text-with-html/
CHICAGO
" » Highlight text with HTML." Rohit Sharma | Sciencx - Accessed . https://www.scien.cx/2021/12/18/highlight-text-with-html/
IEEE
" » Highlight text with HTML." Rohit Sharma | Sciencx [Online]. Available: https://www.scien.cx/2021/12/18/highlight-text-with-html/. [Accessed: ]
rf:citation
» Highlight text with HTML | Rohit Sharma | Sciencx | https://www.scien.cx/2021/12/18/highlight-text-with-html/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.