2008-04-22
HTML 初学-基础标签实例
关键字: html
本人好记忆力极差,记于此以备查询。
HTML 基础标签实例
一个简单的html
简单的段落
更多的段落
“诗歌”问题,由于浏览器会直接省略掉排版好的文本
拆行(br标签)
标题(h1最大)
居中(<h1 align="center">This is heading 1</h1>)
水平线(hr标签)
隐藏的注释 (<!-- ** -->)
背景颜色(<body bgcolor="yellow">)
HTML 基础标签实例
一个简单的html
<html> <body> <p>试试看</p> </body> </html>
简单的段落
<html> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a p tag.</p> </body> </html>
更多的段落
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <p> This paragraph contains a lot of lines in the source code, but the browser ignores it. </p> <p> This paragraph contains a lot of spaces in the source code, but the browser ignores it. </p> <p> The number of lines in a paragraph depends on the size of your browser window. If you resize the browser window, the number of lines in this paragraph will change. </p> </body> </html>
“诗歌”问题,由于浏览器会直接省略掉排版好的文本
<html>
<body>
<p>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</p>
<p>Note that your browser simply ignores your formatting!</p>
</body>
</html>
拆行(br标签)
<html> <body> <p> To break<br>lines<br>in a<br>paragraph,<br>use the br tag. </p> </body> </html>
标题(h1最大)
<html> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> <p>Use heading tags only for headings. Don't use them just to make something bold. Use other tags for that.</p> </body> </html>
居中(<h1 align="center">This is heading 1</h1>)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <h1 align="center">This is heading 1</h1> <p>The heading above is aligned to the center of this page. The heading above is aligned to the center of this page. The heading above is aligned to the center of this page.</p> </body> </html>
水平线(hr标签)
<html> <body> <p>The hr tag defines a horizontal rule:</p> <hr> <p>This is a paragraph</p> <hr> <p>This is a paragraph</p> <hr> <p>This is a paragraph</p> </body> </html>
隐藏的注释 (<!-- ** -->)
<html> <body> <!--This comment will not be displayed--> <p>This is a regular paragraph</p> </body> </html>
背景颜色(<body bgcolor="yellow">)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-cn" /> </head> <body bgcolor="yellow"> <h2>Look: Colored Background!</h2> </body> </html>
发表评论
- 浏览: 3758 次
- 性别:

- 来自: 深圳

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
Rails2之Depot
用上了restful的scaffold最好把admin换成名字空间,下面做pro ...
-- by neodoxy -
Rails2之Depot
要是可以用radrails 来展示就更好了...
-- by antony_jiang -
听说Rails 2.1有个Time Z ...
楼主用的竟然是Mac
-- by Dreamer -
听说Rails 2.1有个Time Z ...
在2.0版本中就已经有了;
-- by PBFox -
听说Rails 2.1有个Time Z ...
确实之前就有了,不过Rails 2.10是Built-in的 多了一些新特性, ...
-- by t0uch






评论排行榜