Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set modifier lines for text by HTML

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how HTML sets decoration lines for text. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.

Introduction to text-decoration attribute

The text-decoration property is used to set the text decoration line. The text-decoration property has a total of 4 values.

text-decoration attribute value description table

value effect none remove text modifier line underline overline underline line-through strikethrough

HTML tags with their own modifier lines

Before starting to practice the text-decoration attribute, the author first gives you the popularization of HTML tags with decorative lines such as: u tag, s tag, if there are incomplete you can tell the author in the comments below, after all, the author is also a small white at the front end, hope to communicate with each other, help each other, and make progress together.

u tag

Let's get into the practice of u tags, which come with text underscores.

Code block:

Set text modifier Success is not beating others, but changing yourself.

Note: The u tag can also be used in conjunction with other tags in HTML, such as nesting the u tag into the h2 tag.

Code block:

Success is not beating others, but changing yourself.

S label

Let's get into the practice of s-tags, which come with strikeouts.

Code block:

Set text modifier Success is not beating others, but changing yourself.

Note: s tag can also be nested, consistent with u tag, the author will not introduce too much.

none Remove trim lines

Let's go into the none value practice of the text-decoration attribute. For example, the author removes the strikethrough line from the s tag in the HTML page.

Code block:

Set text modifier s{ text-decoration: none; } Success is not beating others, but changing yourself.

Note: u tag, s tag, including text-decoration attribute value all decoration line can be removed oh.

underline

Let's go into the text-decoration attribute's underline value practice, for example: I set an underscore in the text of the h3 tag in the HTML page.

Code block:

Set text modifier h3{ text-decoration: underline; } Success is not beating others, but changing yourself.

overline

Let's go into the practice of overline value of text-decoration attribute. For example, the author sets an overline in the text of h3 tag in HTML page.

Code block:

Set text modifier h3{ text-decoration: overline; } Success is not beating others, but changing yourself.

line-through Set strikethrough

Let's go into the line-through value practice of the text-decoration attribute. For example, the author sets a strikethrough in the text of the h3 tag in the HTML page.

Code block:

Set text modifier h3{ text-decoration: line-through; } Success is not to beat others, but to change oneself about "HTML how to set decoration lines for text" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report