- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the color of the text decoration in CSS
To set the color of the text decoration, use the text-decoration-color property −
Example
<!DOCTYPE html> <html> <head> <style> .demo { text-decoration: overline; text-decoration-color: yellow; } </style> </head> <body> <h1>Examination Details</h1> <p class="demo">Exam on 20th December.</p> <p class="demo2">Exam begins at 9AM.</p> </body> </html>
Output
Example
Let us now see another example −
<!DOCTYPE html> <html> <head> <style> .demo { text-decoration: underline; text-decoration-color: orange; } </style> </head> <body> <h1>Details</h1> <p class="demo">Examination Center near ABC College.</p> <p class="demo2">Exam begins at 9AM.</p> </body> </html>
Output
- Related Articles
- Set the style of the text decoration in CSS
- Animate CSS text-decoration-color property
- How to set the color of the text-decoration with JavaScript?
- Set the kind of decoration used on text in CSS
- How to Change Link Underline Color using text-decoration-color CSS
- Text Decoration in CSS
- Text Decoration Using CSS
- Usage of text-decoration property in CSS
- How to set the color of a text with CSS
- How to set the decoration of a text with JavaScript?
- How to set the style of the line in a text decoration with JavaScript?
- How to set the type of line in a text-decoration with JavaScript?
- Set the Color of links with CSS
- Set the color of the border with CSS
- Set the color of the outline with CSS

Advertisements