Detailed explanation of HTML markup text

php中世界最好的语言
Release: 2018-01-22 10:45:32
Original
2065 people have browsed it

This time I will bring you a detailed explanation of HTML markup text. What are theprecautionsfor HTML markup text? Here is a practical case, let’s take a look.

. Use basic text elements to mark content

Corresponding HTML code:

    Learn4Font 

元素 b —— I am the example.

元素 em —— I am the example.

元素 i —— I am the example.

元素 s —— I am the example.

元素 strong —— I am the example.

元素 u —— I am the example.

元素 small —— I am the example.

元素 sub —— I am the example.

元素 sup —— I am the example.

Copy after login

Corresponding element style:

*一般表示关键词和产品名称* b{font-weight: bolder;} *一般表示加以强调* em {font-style: italic;} *一般表示外文词语或科技术语* i {font-style: italic;} *一般表示不准确或校正* s {text-decoration: line-through;} *一般表示重要文字* strong {font-weight: bolder;} *一般表示为文字添加下划线* u {text-decoration: underline;} *一般表示为添加小号字体内容* small {font-size: small;} *一般表示添加上标和下标* sup {vertical-align: sub; font-size: smaller;} sub {vertical-align: super; font-size:smaller;}
Copy after login

2. Use language elements

ruby, rt and rp elements, look at the effect first:

Corresponding code:

(chī) (mèi) (wǎng) (liǎng)

Copy after login

3. Use pre-formatted content

pre elements can be changed The way the browser handles content prevents whitespace characters from being merged, allowing the formatting in the source document to be preserved.

  var fruits = ["apples","oranges","mangoes","cherries"]; for(var i= 0; i < fruits.length; i++){ document.writeln("I like " + fruits[i]); } 
Copy after login

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Detailed examples of HTML text formatting

h5How to implement input box prompts + normal text Box prompt

Detailed explanation of HTML Form form elements

The above is the detailed content of Detailed explanation of HTML markup text. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!