日期:2014-05-17  浏览次数:20692 次

html 标准基础 小记
1.最基本标签
HTML 标题
HTML 标题(Heading)是通过 <h1> - <h6> 等标签进行定义的。
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>

HTML 段落
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML 链接
<a href="http://www.w3school.com.cn">This is a link</a>

HTML 图像
<img src="w3school.jpg" width="104" height="142" />
HTML 提示:使用小写标签
HTML 标签对大小写不敏感:<P> 等同于 <p>。许多网站都使用大写的 HTML 标签。
W3School 使用的是小写标签,因为万维网联盟(W3C)在 HTML 4 中推荐使用小写,而在未来 (X)HTML 版本中强制使用小写。

标签 描述
<html> 定义 HTML 文档。
<body> 定义文档的主体。
<h1> to <h6> 定义 HTML 标题
<hr> 定义水平线。
<!--> 定义注释。
<p> 定义段落。
<br /> 插入单个折行(换行)。

文本格式化标签
标签 描述
<b> 定义粗体文本。
<big> 定义大号字。
<em> 定义着重文字。
<i> 定义斜体字。
<small> 定义小号字。
<strong> 定义加重语气。
<sub> 定义下标字。
<sup> 定义上标字。
<ins> 定义插入字。
<del> 定义删除字。

引用、引用和术语定义
标签 描述
<abbr> 定义缩写。
<acronym> 定义首字母缩写。
<address> 定义地址。
<bdo> 定义文字方向。
<blockquote> 定义长的引用。

2.基本样式
style="background-color:yellow"
style="font-family:arial;color:red;font-size:20px;"
style="text-align:center"

3.<a>
<a href="#tips">Visit the Useful Tips Section</a>
<a href="http://www.w3school.com.cn/html_links.htm#tips">
Visit the Useful Tips Section
</a>
<a name="tips">Useful Tips Section</a>

4.<table>
border=0 无边框,默认 table上的
cellpadding="10" 内容写边框的距离 table上的

colspan="2" 跨行 td,th上的
rowspan="2" 跨列 td,th上的

5.<img>
<img src="/i/eg_cute.gif" align="bottom" alt="向左转" width="50" height="50" >
align:对齐
bottom
middle
top
right
left

把图像作为链接来使用:
<a href="/example/html/lastpage.html">
<img border="0" src="/i/eg_buttonnext.gif" />
</a>
img 中加上ismap 加以将坐标传到url中?20,78

图像中点坐标
<img
src="/i/eg_planets.jpg"
border="0" usemap="#planetmap"
alt="Planets" />
<map name="planetmap" id="planetmap">
<area
shape="circle"
coords="180,139,14"
href ="/example/html/venus.html"
target ="_blank"
alt="Venus" />
<area
shape="circle"
coords="129,161,10"
href ="/example/html/mercur.html"
target ="_blank"
alt="Mercury" />
<area
shape="rect"
coords="0,0,110,260"
href ="/example/html/sun.html"
target ="_blank"
alt="Sun" />
</map>