This article mainly tells about the HTML underline setting method, as well as the HTML underline setting instance, this article all uses the CSS style to manipulate, hoped that everybody grasps the point CSS style basic knowledge.
First, let's talk about how to set the underscore:
We know that the HTML tag has an underscore u tag (<u> is underlined </u>), and you can simply implement the underline style with the underlined text font plus the HTML underline label U. However, in the Div CSS layout, it is sometimes necessary for CSS to implement an underline style effect, which is the CSS underline style.
1.CSS Underline style Word:
Text-decoration
2.CSS Underline code:
Text-decoration:underline
3.css Underline Code Demonstration:
Div{text-decoration:underline}
Underline the text in the Div.
Now say the CSS font with an underscore style instance:
The following is an instance of the CSS underline setting, which sets the underline style for several of the words in a paragraph.
Set the underline CSS style instance code as follows:
<! DOCTYPE html>
These underline some of the text in a paragraph. As the effect below:
Finally say the div CSS underline settings summary:
You may think that we will use the HTML u tag underline, why use CSS text-decoration style to underline? This is because in the CSS layout is the ever-changing implementation of a variety of layouts, in order to meet the different needs of the general HTML tags can be implemented in the CSS style can be implemented, and sometimes the use of CSS implementation can be conducive to later modification maintenance. But instead of learning CSS instead of using HTML tags to implement the required styles, sometimes HTML tags and CSS styles based on the need to choose the layout of the most suitable for the project is the div CSS layout important essence. Achieve code simplification, code easy to maintain, search engine ranking considerations, programmer easy to use and so on.
OK, the above is the whole content of this article, there are questions can be asked below.