1.HTML三部分:<html></html> <title></title> <body></body>
例子:
This the first HTML page This the HTML web page!
运行结果:
2.标题
格式:<hn 属性>文字添加部分</hn> 其中 n=1~6
例子:
This the first HTML page This the HTML web page!This the HTML web page!
This the HTML web page!
This the HTML web page!
This the HTML web page!
This the HTML web page!
This the HTML web page!
This the HTML web page!
运行结果:
3.段落、换行、空格
<p> 段落标记
<br> 换行标记
空格标记
例子:
This the first HTML page Paragraph
Paragraph1
Paragraph2
Paragraph3
Newline
Newline1Newline2Newline3Blank
Blank1 Blank2 Blank3
运行结果:
4.标签中的属性和区域控制标签
格式: <标签名 属性1 = "属性值" 属性值2 = "属性值" ...... 属性值n = "属性值">内容</标签名>
<div align = "center/left/right">文本</div> 区域控制标签
例子:
This the first HTML page HTMLHTMLHTML
运行结果:
5.在网页中加入水平线
格式: <hr align = "" size = "" width = "" color = "" [noshade]>
noshade 是否显示阴影
例子:
This the first HTML page
运行结果:
6.显示预排格式标签
格式:<pre>文字内容</pre>
例子:
This the first HTML page This the HTML web page!
This the first sentense! This the second sentense!This the third sentense! This the fifth sentense!This the HTML web page!
This the first sentense! This the second sentense!This the third sentense! This the fourth sentense!
运行结果:
7.文字标签font
格式:<font size = "" color = "" face = "">文字</font>
例子:
This the first HTML page This the HTML web page! This the HTML web page! This the HTML web page! This the HTML web page! 23 23
This the HTML web page!
运行结果:
8.超级链接
格式:<a href = "路径" name = "热点名" target = "打开方式">链接元素</a>
例子:
This the first HTML page
运行结果:
9.链接
格式: <a href = "#标记号">热点文本</a>
<a name = "标记号">显示的热点文本</a>
例子:
This the first HTML page 热点文字HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
跳到这里HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
HTML
运行结果:
10.链接标签综合应用:应用到别的页面的热点
格式: <a href = "路径#标记号">热点文本</a>
例子:
This the first HTML page 链接到SevenPage.html的一个热点区域
运行结果:
单击链接结果:
相关文章:
(1)HTML基础(一)(2)