1.用基础的文本元素标识內容
先看显示信息实际效果:
对应HTML编码:
XML/HTML Code拷贝內容到剪贴板
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF⑻">
- <title>Learn4Font</title>
- </head>
- <body>
- <p> 元素 b —— <b> I am the example.</b></p>
- <p> 元素 em —— <em> I am the example.</em></p>
- <p> 元素 i —— <i> I am the example.</i></p>
- <p> 元素 s —— <s> I am the example.</s></p>
- <p> 元素 strong —— <strong> I am the example.</strong></p>
- <p> 元素 u —— <u> I am the example.</u></p>
- <p> 元素 small —— <small> I am the example.</small></p>
- <p> 元素 sub —— <sub> I am the example.</sub></p>
- <p> 元素 sup —— <sup> I am the example.</sup></p>
- </body>
- </html>
对应元素习惯性款式:
XML/HTML Code拷贝內容到剪贴板
- *1般表明重要词和商品名字*
- b{font-weight: bolder;}
- *1般表明加以强调*
- em {font-style: italic;}
- *1般表明外文词语或高新科技术语*
- i {font-style: italic;}
- *1般表明禁止确或校准*
- s {text-decoration: line-through;}
- *1般表明关键文本*
- strong {font-weight: bolder;}
- *1般表明为文本加上下划线*
- u {text-decoration: underline;}
- *1般表明为加上小号字体样式內容*
- small {font-size: small;}
- *1般表明加上上标和下标*
- sup {vertical-align: sub; font-size: smaller;}
- sub {vertical-align: super; font-size:smaller;}
2.应用語言元素
ruby、rt 和 rp 元素,先看实际效果:
对应编码:
XML/HTML Code拷贝內容到剪贴板
- <p style=" font-size: 3em;">
- <ruby>魑<rp>(</rp><rt>chī</rt><rp>)</rp></ruby>
- <ruby>魅<rp>(</rp><rt>mèi</rt><rp>)</rp></ruby>
- <ruby>魍<rp>(</rp><rt>wǎng</rt><rp>)</rp></ruby>
- <ruby>魉<rp>(</rp><rt>liǎng</rt><rp>)</rp></ruby>
- </p>
3.应用预先编排好文件格式的內容
pre 元素能够更改访问器解决內容的方法,阻拦合拼空白标识符,让源文本文档中的文件格式得以保存。
XML/HTML Code拷贝內容到剪贴板
- <pre>
- <code>
- var fruits = ["apples","oranges","mangoes","cherries"];
- for(var i= 0; i < fruits.length; i++){
- document.writeln("I like " + fruits[i]);
- }
- </code>
- </pre>
以上这篇【HTML 元素】标识文本详解便是网编共享给大伙儿的所有內容了,期待能给大伙儿1个参照,也期待大伙儿多多适用脚本制作之家。
原文详细地址:http://www.cnblogs.com/luka/archive/2016/07/23/5532134.html