HTML和CSS的关系
视频锁定
{$ currentTime | date:'mm:ss' $}
{$ timeLeft | date:'mm:ss' $}
HTML代表超文本标记语言。超文本是指“在里面有文本和它的链接”。任何时候你点击一个标记,字母或汉字等,如果你点击的是超文本链接,那么它会带你到一个新的网页!
HTML不是一种编程语言,而是一种标记语言,是用来做文字标记的语言:
它可以把文字转换成图像、链接、表格、列表等等。
是什么使网页变的更漂亮些呢?那就是CSS - Cascading Style Sheets
。翻译过来就是层叠样式表。你可以把它想象成皮肤和化妆品,会覆盖到HTML上。我们先学习HTML,大家担心的CSS会在HTML后面的课程里面介绍到。
我们要做的第一件事情就是设置页面的框架结构。
a. 通常我们把<!DOCTYPE html>
是在第一行,它会告诉浏览器它是什么语言,以什么语言方式去读取它,在这里是HTML。
b. 我们也经常把<html>
放在下一行,它表示一个HTML文档的开始。
c. 我们经常把</html>
闭合标签放在最后一行,它表示一个HTML文档的结束。
d. 我们经常把<head></head>
放在<html>
与</html>
中间,而<head></head>
的中间会放一些头部信息(以后会详细讲述)
e. 我们还经常把<body></body>
放在<head></head>
这组标签的下面,当然也还是在<html></html>
标签的里面,我们会把想要在网页上表达的内容写在<body></body>
中间!
说明
现在测试文件是一片空白的,把刚才上面讲诉的三组标签代码写入文件。
在
<body>
和</body>
标签之间,你可以随便写下你自己喜欢的任何信息。
在线练习
{$ activeFileHint $}