{"id":4907,"date":"2022-03-14T01:00:00","date_gmt":"2022-03-14T00:00:00","guid":{"rendered":"https:\/\/alvarotrigo.com\/epa\/css-highlight-text\/"},"modified":"2024-02-08T00:38:54","modified_gmt":"2024-02-07T23:38:54","slug":"css-highlight-text","status":"publish","type":"post","link":"https:\/\/alvarotrigo.com\/blog\/css-highlight-text\/","title":{"rendered":"How to Highlight Text in CSS [and Some Amazing Examples]"},"content":{"rendered":"\n<p>In this article, we will learn about <strong>CSS highlight text<\/strong> effects and create cool aesthetics to make certain words and sentences stand out.<\/p>\n\n\n\n<p><strong>Highlight text (CSS)<\/strong> is used for links, to make them more visible, for important words to draw attention to them and for other uses like the most copied or Tweeted text, an easy way to show which text is the most popular.<\/p>\n\n\n\n<p>In real life, you would use a range of highlighter pens, but in web development, we will be using HTML and CSS.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/alvarotrigo.com\/blog\/assets\/imgs\/2022-03-14\/highlight-text-with-pure-css-only.jpeg\" alt=\"Highlight Text With Pure CSS\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-do-i-highlight-text-in-css%3F\">How Do I Highlight Text In CSS?<\/h2>\n\n\n\n<p><strong>To Highlight text in HTML you have to use an inline element such as the <code>&lt;span&gt;<\/code> element and apply a specific background style on it. This will create the highlighting effect, which you can tweak in many different ways to create different looks.<\/strong><\/p>\n\n\n\n<p>Most of the examples in this article follow the following structure:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n    Normal Text vs <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">span<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\u201dhighlight\u201d<\/span>&gt;<\/span>highlighted text.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">span<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-class\">.highlight<\/span>{\n    <span class=\"hljs-attribute\">display<\/span>: inline-block;\n    <span class=\"hljs-attribute\">padding<\/span>: .<span class=\"hljs-number\">25em<\/span> <span class=\"hljs-number\">0<\/span>;\n    <span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-number\">#FFC107<\/span>;\n    <span class=\"hljs-attribute\">color<\/span>: <span class=\"hljs-number\">#ffffff<\/span>;\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"12-awesome-css-highlight-text-effects\">12 Awesome CSS Highlight Text Effects<\/h2>\n\n\n\n<p>Let\u2019s dive in and see some real-world examples of cool CSS highlight text effects. You can use these examples for your website, learn from them, or get inspired!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1.-text-highlight-with-yellow-color\">1. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/rNpaBJJ\" target=\"_blank\" rel=\"noopener nofollow\">Text Highlight With Yellow Color<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_rNpaBJJ\" data-src=\"\/\/codepen.io\/anon\/embed\/rNpaBJJ?height=450&amp;theme-id=1&amp;slug-hash=rNpaBJJ&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed rNpaBJJ\" title=\"CodePen Embed rNpaBJJ\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/rNpaBJJ\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A beautiful example of how to highlight text with a bit of style.<\/p>\n\n\n\n<p>Notice that the highlighting is not perfectly rectangular and uses some rounded borders together with some small rotation to give it a more natural look and feel.<\/p>\n\n\n\n<p>I find this effect especially useful for headings. Sometimes, depending on the highlighting color, we might want to also change the color of the highlighted text to something that can create more contrast with the background.<\/p>\n\n\n\n<p>Remember the whole point of highlighting something is making it easier to read.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2.-slanting-css-highlight-text-effect\">2. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/oNpvMbb\" target=\"_blank\" rel=\"noopener nofollow\">Slanting CSS Highlight Text Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_oNpvMbb\" data-src=\"\/\/codepen.io\/anon\/embed\/oNpvMbb?height=450&amp;theme-id=1&amp;slug-hash=oNpvMbb&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed oNpvMbb\" title=\"CodePen Embed oNpvMbb\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/oNpvMbb\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>This cool slanting CSS highlight text effect is very cool and looks appealing.<\/p>\n\n\n\n<p>It just uses the HTML <code>&lt;strong&gt;<\/code> element to highlight bold text with this cool effect.<\/p>\n\n\n\n<p>Very simple to use and comes with a nice code example to learn from.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3.-block-highlight-text-(css)\">3. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/KKZPBVx\" target=\"_blank\" rel=\"noopener nofollow\">Block Highlight Text (CSS)<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_KKZPBVx\" data-src=\"\/\/codepen.io\/anon\/embed\/KKZPBVx?height=450&amp;theme-id=1&amp;slug-hash=KKZPBVx&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed KKZPBVx\" title=\"CodePen Embed KKZPBVx\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/KKZPBVx\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>By using an HTML span element, you can create this lovely blocked CSS highlight text effect.<\/p>\n\n\n\n<p>You just need to apply the CSS class to your span element and then the effect is applied.<\/p>\n\n\n\n<p>Very easy to use and creates a bold look, easily change the colors to match your style in the CSS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4.-highlight-text-with-animation-on-page-load\">4. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/popvzVw\" target=\"_blank\" rel=\"noopener nofollow\">Highlight Text With Animation On Page Load<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_popvzVw\" data-src=\"\/\/codepen.io\/anon\/embed\/popvzVw?height=450&amp;theme-id=1&amp;slug-hash=popvzVw&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed popvzVw\" title=\"CodePen Embed popvzVw\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/popvzVw\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>In this example, we can see a totally different approach to the highlighting effect.<\/p>\n\n\n\n<p>The highlight will not be present on page load instead, it will get animated on page load creating a beautiful effect that will for sure catch your visitor&#8217;s attention.<\/p>\n\n\n\n<p>If you are looking for an animation on page load, this example is the one for you.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5.-animated-css-text-highlighting-on-hover\">5. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/jOYNKKY\" target=\"_blank\" rel=\"noopener nofollow\">Animated CSS Text Highlighting On Hover<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_jOYNKKY\" data-src=\"\/\/codepen.io\/anon\/embed\/jOYNKKY?height=450&amp;theme-id=1&amp;slug-hash=jOYNKKY&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed jOYNKKY\" title=\"CodePen Embed jOYNKKY\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/jOYNKKY\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Static CSS highlight text effects are cool, but using some simple animation can create more engagement.<\/p>\n\n\n\n<p>This hover effect is fantastic and makes words more interactive, which is very important.<\/p>\n\n\n\n<p>You can even adapt this to work with a button that pops up on a word along with this effect.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Don\u2019t miss out on these <a href=\"https:\/\/alvarotrigo.com\/blog\/best-css-button-hover-effects\/\">CSS button hover effects<\/a> as well<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6.-highlight-text-with-circle-pen-animation\">6. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/dyJbjMX\" target=\"_blank\" rel=\"noopener nofollow\">Highlight Text With Circle Pen Animation<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_dyJbjMX\" data-src=\"\/\/codepen.io\/anon\/embed\/dyJbjMX?height=450&amp;theme-id=1&amp;slug-hash=dyJbjMX&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed dyJbjMX\" title=\"CodePen Embed dyJbjMX\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/dyJbjMX\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A cool CSS highlight text effect that makes it look like you have circled a word with a pen.<\/p>\n\n\n\n<p>This CSS CodePen shows you how you can easily only target a single word within a sentence, inside an HTML P tag.<\/p>\n\n\n\n<p>The CSS used here is simple enough as well, you can easily change the colors and sizing of the circle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7.-css-sketch-text-highlight\">7. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/RwxNbqw\" target=\"_blank\" rel=\"noopener nofollow\">CSS Sketch Text Highlight<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_RwxNbqw\" data-src=\"\/\/codepen.io\/anon\/embed\/RwxNbqw?height=450&amp;theme-id=1&amp;slug-hash=RwxNbqw&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed RwxNbqw\" title=\"CodePen Embed RwxNbqw\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/RwxNbqw\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>This example by <a href=\"https:\/\/codepen.io\/inegoita\" target=\"_blank\" rel=\"noopener nofollow\">Ion Emil<\/a> shows us that highlighting can be done in many different ways.<\/p>\n\n\n\n<p>In this case, instead of using a more traditional yellow highlighting effect, it uses a sketchy-looking highlighting effect that looks as if it was done with a pen over a piece of paper.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"8.-realistic-marker-hover-highlight-effect\">8. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/WNdeKQJ\" target=\"_blank\" rel=\"noopener nofollow\">Realistic Marker Hover Highlight Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_WNdeKQJ\" data-src=\"\/\/codepen.io\/anon\/embed\/WNdeKQJ?height=450&amp;theme-id=1&amp;slug-hash=WNdeKQJ&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed WNdeKQJ\" title=\"CodePen Embed WNdeKQJ\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/WNdeKQJ\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Made by <a href=\"https:\/\/codepen.io\/PickJBennett\/\" target=\"_blank\" rel=\"noopener nofollow\">Jeffrey<\/a>, this is another cool hover effect paired with a realistic marker effect.<\/p>\n\n\n\n<p>It uses an SVG to pull off the realistic look, but it is simple enough to use on a webpage, it will scale to any size text.<\/p>\n\n\n\n<p>Pure CSS as well, so it is very lightweight.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>You can also find cool animations with <a href=\"https:\/\/alvarotrigo.com\/blog\/hamburger-menu-css\/\">CSS Hamburger Menus<\/a> as well, check out our article on that too<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"9.-higlight-text-with-underline-transition\">9. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWXPKop\" target=\"_blank\" rel=\"noopener nofollow\">Higlight Text With Underline Transition<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_NWXPKop\" data-src=\"\/\/codepen.io\/anon\/embed\/NWXPKop?height=450&amp;theme-id=1&amp;slug-hash=NWXPKop&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed NWXPKop\" title=\"CodePen Embed NWXPKop\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWXPKop\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>When we talk about highlighting text, we usually think about adding something on top of the text. However, another way to emphasize something can also be by underlying it.<\/p>\n\n\n\n<p>So, why not, here&#8217;s a different kind of highlighting effect if you don&#8217;t mind using an underline instead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"10.-realistic-marker-effect\">10. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/mdpbjPm\" target=\"_blank\" rel=\"noopener nofollow\">Realistic Marker Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_mdpbjPm\" data-src=\"\/\/codepen.io\/anon\/embed\/mdpbjPm?height=450&amp;theme-id=1&amp;slug-hash=mdpbjPm&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed mdpbjPm\" title=\"CodePen Embed mdpbjPm\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/mdpbjPm\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If you are looking for a super realistic marker effect, this one is for you.<\/p>\n\n\n\n<p>It looks really cool and realistic as if you actually used a marker pen.<\/p>\n\n\n\n<p>An SVG is used to pull this off and create the special edges on the highlighted text, but it is still simple enough to use and not complicated.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"11.-highlight-text-with-color-gradients\">11. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/BaJyBvz\" target=\"_blank\" rel=\"noopener nofollow\">Highlight Text With Color Gradients<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_BaJyBvz\" data-src=\"\/\/codepen.io\/anon\/embed\/BaJyBvz?height=450&amp;theme-id=1&amp;slug-hash=BaJyBvz&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed BaJyBvz\" title=\"CodePen Embed BaJyBvz\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/BaJyBvz\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>If you are into gradients, why not use gradient color for your highlighted text too?<\/p>\n\n\n\n<p>This example makes use of the <code>linear-gradient<\/code> function inside <code>background-image<\/code> to generate the gradient highlight effect. Feel free to play with it and customize the gradients!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"12.-multi-coloured-overlapping-highlighting\">12. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExoYpyY\" target=\"_blank\" rel=\"noopener nofollow\">Multi-Coloured Overlapping Highlighting<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_ExoYpyY\" data-src=\"\/\/codepen.io\/anon\/embed\/ExoYpyY?height=450&amp;theme-id=1&amp;slug-hash=ExoYpyY&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed ExoYpyY\" title=\"CodePen Embed ExoYpyY\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/ExoYpyY\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A little more complicated, but the result is very interesting and could be just what you are looking for.<\/p>\n\n\n\n<p>Requires use of all HTML, CSS, and JS to pull this effect off.<\/p>\n\n\n\n<p>However, you can easily change the colors with the RGB values in the JS code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"13.-gradient-highlight-text-(css)\">13. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/VwyZBjK\" target=\"_blank\" rel=\"noopener nofollow\">Gradient Highlight Text (CSS)<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_VwyZBjK\" data-src=\"\/\/codepen.io\/anon\/embed\/VwyZBjK?height=450&amp;theme-id=1&amp;slug-hash=VwyZBjK&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed VwyZBjK\" title=\"CodePen Embed VwyZBjK\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/VwyZBjK\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A fancy way of highlighting HTML text with a cool gradient.<\/p>\n\n\n\n<p>You can pick any gradient you like and create a sleek look for your text.<\/p>\n\n\n\n<p>The CSS is simple, but the outcome is fantastic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"14.-big-realistic-marker-effect\">14. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/QWaLBEB\" target=\"_blank\" rel=\"noopener nofollow\">Big Realistic Marker Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_QWaLBEB\" data-src=\"\/\/codepen.io\/anon\/embed\/QWaLBEB?height=450&amp;theme-id=1&amp;slug-hash=QWaLBEB&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed QWaLBEB\" title=\"CodePen Embed QWaLBEB\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/QWaLBEB\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Highlighting text can be a fantastic way to make certain things stand out, in this case, pricing is the example here.<\/p>\n\n\n\n<p>If you have an important page like pricing, highlighting the text can be a sure starting way to draw attention to a specific area.<\/p>\n\n\n\n<p>This example uses a simple SVG to get a realistic look, but the CSS is still relatively simple.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"15.-border-css-highlight-text-effect\">15. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/qBpWyqb\" target=\"_blank\" rel=\"noopener nofollow\">Border CSS Highlight Text Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_qBpWyqb\" data-src=\"\/\/codepen.io\/anon\/embed\/qBpWyqb?height=450&amp;theme-id=1&amp;slug-hash=qBpWyqb&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed qBpWyqb\" title=\"CodePen Embed qBpWyqb\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/qBpWyqb\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>A very simple CSS highlight text effect.<\/p>\n\n\n\n<p>Basically, just a border around the text, using a span element to select certain parts of the text.<\/p>\n\n\n\n<p>You can easily change the color and padding around the CSS highlight text as well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"16.-arrow-css-highlight-text-effect\">16. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/LYePBRG\" target=\"_blank\" rel=\"noopener nofollow\">Arrow CSS Highlight Text Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_LYePBRG\" data-src=\"\/\/codepen.io\/anon\/embed\/LYePBRG?height=450&amp;theme-id=1&amp;slug-hash=LYePBRG&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed LYePBRG\" title=\"CodePen Embed LYePBRG\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/LYePBRG\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>Another cool CSS highlight text effect with a different style.<\/p>\n\n\n\n<p>Shows how you can highlight specific words inside a sentence.<\/p>\n\n\n\n<p>Simple CSS used and just a span element with a CSS class to use it throughout a webpage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"17.-ribbon-css-highlight-text-effect\">17. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/popzZEQ\" target=\"_blank\" rel=\"noopener nofollow\">Ribbon CSS Highlight Text Effect<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_popzZEQ\" data-src=\"\/\/codepen.io\/anon\/embed\/popzZEQ?height=450&amp;theme-id=1&amp;slug-hash=popzZEQ&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed popzZEQ\" title=\"CodePen Embed popzZEQ\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/popzZEQ\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>There are many ways to highlight text using CSS, here we have a green ribbon effect that highlights a few words.<\/p>\n\n\n\n<p>By using a different shape, it can help make your text stand out more.<\/p>\n\n\n\n<p>The CSS is simple as well, easy to change the color or effect if needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"18.-bonus-css-highlight-text-effect-(jquery)\">18. <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWXKBbz\" target=\"_blank\" rel=\"noopener nofollow\">Bonus CSS Highlight Text Effect (jQuery)<\/a><\/h3>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_NWXKBbz\" data-src=\"\/\/codepen.io\/anon\/embed\/NWXKBbz?height=450&amp;theme-id=1&amp;slug-hash=NWXKBbz&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed NWXKBbz\" title=\"CodePen Embed NWXKBbz\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/NWXKBbz\" title=\"Preview\" target=\"_blank\" rel=\"noopener nofollow\">Preview<\/a><\/div>\n<\/div>\n\n\n\n<p>We\u2019ve seen some amazing CSS highlight text effects and they all offer something different. They can help make certain parts of your text stand out and draw attention to something.<\/p>\n\n\n\n<p>This bonus one was added in because it shows you how you can use jQuery to programmatically use these text effects to highlight text, check it out!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"related-articles\">Related Articles<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/7-scroll-text-animations-css-and-js\/\">Scroll Text Animations examples with CSS and JS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/css-text-animations\/\">Best CSS Text Animation Effects<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/make-font-bold-in-css-best-ways\/\">Best Ways To Make Font Bold in CSS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/highlight-text-carrd\/\">How to Highlight Text in Carrd Builder<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/alvarotrigo.com\/blog\/css-calendar\/\">Pure CSS calendars<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Looking for some cool highlighting effects for your texts? Here&#8217;s a list with our selection of the best and more original CSS-Only Highlight Text Effects. Check them out!<\/p>\n","protected":false},"author":11,"featured_media":4906,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[106],"tags":[9,16,17],"class_list":["post-4907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","tag-css","tag-design","tag-web"],"acf":[],"_links":{"self":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/comments?post=4907"}],"version-history":[{"count":3,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4907\/revisions"}],"predecessor-version":[{"id":9520,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/4907\/revisions\/9520"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media\/4906"}],"wp:attachment":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media?parent=4907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/categories?post=4907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/tags?post=4907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}