Open In App

CSS text-emphasis Property

Last Updated : 31 Oct, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will discuss text-emphasis property in CSS. It is a short-hand property for text-emphasis-style and text-emphasis-color. It applies emphasis properties to characters (except spaces and control characters).

Syntax:

text-emphasis: text-emphasis-style text-emphasis-color;

Properties:

  • text-emphasis-style:  It defines the shape of the emphasis mark. It accepts values such as filled, open, dot, triangle, none, etc.
  • text-emphasis-color: It defines the color of the emphasis mark.

Example:

HTML




<!DOCTYPE html>
<html>
  
<head>
    <style>
    h2 {
        text-emphasis: filled double-circle green;
        -webkit-text-emphasis: filled double-circle green;
    }
    </style>
    <title>Text Emphasis</title>
</head>
  
<body>
    <center>
        <h2>Welcome to GFG</h2
    </center>
</body>
  
</html>


Output:

Supported Browsers:

  • Chrome 25 and above
  • Edge 79 and above
  • Firefox 46 and above
  • Opera 15 and above
  • Safari 7 and above

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads