highlight text in css code example
Example 1: change highlight color html
::-moz-selection {
color: red;
background: yellow;
}
::selection {
color: red;
background: yellow;
}
Example 2: css text highlight
::selection {
background-color: #000;
color: #fff;
}
Example 3: how to highlight text in html
<mark>text</mark>
Example 4: mark tag in html
mark {
display: inline-block;
line-height: 0em;
padding-bottom: 0.5em;
}
Example 5: how to highlight text in css
<body>
<p>The Math test is on <mark>Friday</mark>.</p>
</body>