• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

Css Basic: text-decoration-line

December 20, 2023

CSS Basic: text-decoration-line

CSS (Cascading Style Sheets) is a fundamental technology used for styling web pages. It allows developers to control the appearance of various elements on a website, including text. One of the properties used to modify text styles is text-decoration-line. In this article, we will explore the different values of this property and how they can be used to enhance the visual presentation of text.

Understanding text-decoration-line

The text-decoration-line property is used to specify the type of line that should be displayed on text. It can be applied to any text element, such as headings, paragraphs, links, or spans. By default, this property is set to none, which means no line is displayed on the text.

Available values

There are several values that can be assigned to the text-decoration-line property:

  • none: No line is displayed on the text.
  • underline: Adds a line underneath the text.
  • overline: Adds a line above the text.
  • line-through: Adds a line through the middle of the text.
  • blink: Makes the text blink (not widely supported).

These values can be used individually or in combination to achieve different effects. For example, if you want to underline and strike through a text, you can use text-decoration-line: underline line-through;.

Examples

Let’s take a look at some examples to see how the text-decoration-line property works:

<style>
  .underline {
    text-decoration-line: underline;
  }
  
  .overline {
    text-decoration-line: overline;
  }
  
  .line-through {
    text-decoration-line: line-through;
  }
</style>

<p class="underline">This text is underlined.</p>
<p class="overline">This text has an overline.</p>
<p class="line-through">This text has a line through it.</p>

In the above example, we have defined three CSS classes that apply different text-decoration-line values to the paragraphs. The first paragraph is underlined, the second has an overline, and the third has a line through it.

Conclusion

The text-decoration-line property in CSS allows developers to add various lines to text elements, such as underlines, overlines, and line-throughs. By understanding and utilizing this property, you can enhance the visual presentation of your website’s content. Experiment with different values and combinations to achieve the desired effects.

For more information on VPS hosting and how it can benefit your website, visit Server.HK.

Recent Posts

  • How to Set Up a WordPress Site on a Hong Kong VPS with aaPanel (Step-by-Step 2026)
  • How to Choose the Right Hong Kong VPS Plan: A Buyer’s Guide for 2026
  • CN2 GIA vs BGP vs CN2 GT: What’s the Real Difference for China Connectivity?
  • Top 5 Use Cases for a Hong Kong Dedicated Server in 2026
  • Hong Kong VPS vs Japan VPS: Head-to-Head for Asia-Pacific Deployments in 2026

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot