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.
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;}
2. Use language elements
ruby, rt and rp elements, look at the effect first:
Corresponding code:
魑 魅 魍 魉
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!