您的位置:首页 > Web前端 > HTML

html入门教程(二)html文本标签:段落、格式、预留格式、缩写与地址、引用

2018-04-03 01:34 701 查看

一、段落,换行,空白行

<html>
<body>
<! --注释-->
<p>hr 标签定<br />义水平线:</p>
<hr />
<p>这是段落。</p>
</body>
</html>



段落<p>
换行<br />
分割线<hr />
注释<! --com-->

二、加粗,强调,大号,斜体,小号,上下标文本

<html>
<body>
<b>This text is bold</b><br />
<strong>This text is strong</strong><br />
<big>This text is big</big><br />
<em>This text is emphasized</em><br />
<i>This text is italic</i><br />
<small>This text is small</small><br />
This text contains
<sub>subscript</sub><br />
This text contains
<sup>superscript</sup>
</body>
</html>



<b>加粗
<strong>强调加粗
<big>大号
<em>强调
<i>斜体
<small>小号
<sub>下标
<sup>上标

三、预留格式

<pre>
for i = 1 to 10
print i
next i
</pre>



<pre>很适合写计算机代码

四、地址与缩写

<html>
<address>
Written by.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
<body>
<abbr title="etcetera">etc.</abbr>
<br />
<acronym title="World Wide Web">WWW</acronym>
<p>在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。</p>
</body>
</html>



<abbr title="sth">表示缩写
<acronym title="sth">
<address>表示地址信息

五、引用

这是长的引用:
<blockquote>
这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。
</blockquote>

这是短的引用:
<q>
这是短的引用。
</q>

<p>
使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现。
</p>



<q>表示短引用,会加引号
<blockquote>表示块引用,会加换行和外边距
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息