HTML 初学-基础标签实例
本人好记忆力极差,记于此以备查询。 HTML 基础标签实例 一个简单的html [code="html"]
试试看
[/code] 简单的段落 [code="html"]
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a p tag.
[/code] 更多的段落 [code="html"]
This paragraph contains a lot of lines in the source code, but the browser ignores it.
This paragraph contains a lot of spaces in the source code, but the browser ignores it.
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.
[/code] “诗歌”问题,由于浏览器会直接省略掉排版好的文本 [code="html"]
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.
Note that your browser simply ignores your formatting!
[/code] 拆行(br标签) [code="html"]
To break
lines
in a
paragraph,
use the br tag.
[/code] 标题(h1最大) [code="html"]
This is heading 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
Use heading tags only for headings. Don't use them just to make something bold. Use other tags for that.
[/code] 居中(
This is heading 1
) [code="html"]
This is heading 1
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.
[/code] 水平线(hr标签) [code="html"]
The hr tag defines a horizontal rule:
This is a paragraph
This is a paragraph
This is a paragraph
[/code] 隐藏的注释 () [code="html"]
This is a regular paragraph
[/code] 背景颜色() [code="html"]
Look: Colored Background!
[/code]