基本HTML标签\文本格式化
2012-11-08 17:05
92 查看
一、HTML标签
标签很全的参考网站:
http://htmling.cn/html/indexm.html
主要通过实例来记忆:
效果如下:
This is another paragraph
This is font size+1 based on default size.
This displayed as italic
This is a link.
<hr/>: 创建水平线
二、HTML文本格式化
2.1
效果如下:
This text is bold
This text is strong
This text is big
This text is emphasized
This text is italic
This text is small
This text contains
subscript
This text contains
superscript
2.2 预格式文本
因为在html代码中多个空格和多行也视为一个空格,而pre标签可以保留空格和换行,适合显示源代码。
比如:
结果:
2.3 缩写和首字母的缩写
结果:
etc.
WWW
在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。
仅对于 IE 5 中的 acronym 元素有效。
对于 Netscape 6.2 中的 abbr 和 acronym 元素都有效。
2.4 长引用和短引用
这是长引用:
这是短引用: 这是短引用。
2.5 删除文本和下划线文本
删除文本 下划线文本
以下引用自W3Cschool:
标签很全的参考网站:
http://htmling.cn/html/indexm.html
主要通过实例来记忆:
<html> <head> <title><h1>HTML basic tag</h1></title> </head> <body> <h1>This is a heading.</h1> <p>This is a paragraph.</p> <p>This is another paragraph</p> <font size="+1" color="blue" face="Times">This is font size+1 based on default size.</font><br> This displayed as <i>italic</i> <br> <a href="http://www.cnblogs.com/sevennight/">This is a link.</a><br> <img src="http://flowerinfo.org/wp-content/gallery/rose-flowers/rose-flower-14.jpg" width="300" height="200"/> </body> </html>
效果如下:
HTML basic tag
This is a heading.
This is a paragraph.This is another paragraph
This is font size+1 based on default size.
This displayed as italic
This is a link.
<marquee behavior="scroll" direction="right" scrolldelay="40" bgcolor="lightblue" vspace="40"> <h2 style="margin:10px">roll...</h2> </marquee>
<hr/>: 创建水平线
二、HTML文本格式化
2.1
<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>
效果如下:
This text is bold
This text is strong
This text is big
This text is emphasized
This text is italic
This text is small
This text contains
subscript
This text contains
superscript
2.2 预格式文本
因为在html代码中多个空格和多行也视为一个空格,而pre标签可以保留空格和换行,适合显示源代码。
比如:
<pre> eg. <pre>pre tag contaiins the namespace and ctrl style..</pre> </pre>
结果:
eg.
pre tag contaiins the namespace and ctrl style.
2.3 缩写和首字母的缩写
<html> <body> <abbr title="etcetera">etc.</abbr> <br /> <acronym title="World Wide Web">WWW</acronym> <p>在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。</p> <p>仅对于 IE 5 中的 acronym 元素有效。</p> <p>对于 Netscape 6.2 中的 abbr 和 acronym 元素都有效。</p> </body> </html>
结果:
etc.
WWW
在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。
仅对于 IE 5 中的 acronym 元素有效。
对于 Netscape 6.2 中的 abbr 和 acronym 元素都有效。
2.4 长引用和短引用
这是长引用: <blockquote>这是长引用。blockquote> 这是短引用: <q>这是短引用。</q>
这是长引用:
这是长引用。
这是短引用: 这是短引用。
2.5 删除文本和下划线文本
<del>删除文本</del> <ins>下划线文本</ins>
删除文本 下划线文本
以下引用自W3Cschool:
文本格式化标签
标签 | 描述 |
---|---|
<b> | 定义粗体文本。 |
<big> | 定义大号字。 |
<em> | 定义着重文字。 |
<i> | 定义斜体字。 |
<small> | 定义小号字。 |
<strong> | 定义加重语气。 |
<sub> | 定义下标字。 |
<sup> | 定义上标字。 |
<ins> | 定义插入字。 |
<del> | 定义删除字。 |
<s> | 不赞成使用。使用 <del> 代替。 |
<strike> | 不赞成使用。使用 <del> 代替。 |
<u> | 不赞成使用。使用样式(style)代替。 |
“计算机输出”标签
标签 | 描述 |
---|---|
<code> | 定义计算机代码。 |
<kbd> | 定义键盘码。 |
<samp> | 定义计算机代码样本。 |
<tt> | 定义打字机代码。 |
<var> | 定义变量。 |
<pre> | 定义预格式文本。 |
<listing> | 不赞成使用。使用 <pre> 代替。 |
<plaintext> | 不赞成使用。使用 <pre> 代替。 |
<xmp> | 不赞成使用。使用 <pre> 代替。 |
引用、引用和术语定义
标签 | 描述 |
---|---|
<abbr> | 定义缩写。 |
<acronym> | 定义首字母缩写。 |
<address> | 定义地址。 |
<bdo> | 定义文字方向。 |
<blockquote> | 定义长的引用。 |
<q> | 定义短的引用语。 |
<cite> | 定义引用、引证。 |
<dfn> | 定义一个定义项目。 |
相关文章推荐
- html基础研究(一)-文本格式化标签研究
- HTML 文本格式化-文字方向(<bdo>标签)
- (1)html简介与基本文本格式化显示
- HTML标签之简单的文本格式化
- html基础--标签,属性,文本格式化标签,计算机输出标签,引用和术语定义
- html(三)页面基本标签及文本段落的设置
- html的基本使用(HTML标签解释)
- 给动态文本里面某个字或单词加HTML标签 如:URL,大小,颜色。。。等等
- html 基本标签
- html <font>文本颜色 字体 大小标签元素
- HTML 参考手册 基本属性 常用标签
- HTML 的基本标签
- 给动态文本里面某个字或单词加HTML标签 如:URL,大小,颜色。。。等等
- Java Web开发4___HTML基本标签: 超链接标签之页面内部链接
- html标签“<textarea>”中文本对齐实现,让人蛋疼的知识
- 从html文本中获取所有img标签
- IOS使用正则表达式去掉html中的标签元素,获得纯文本
- HTML:基本的标签
- 清除文本中的Html标签
- html中表示引用文本的标签:<q>,<blockquote>