前言
最近突然接触到了HTML 5,那就简单学习一下吧。
我使用的是VSCode编辑器,其他软件都可以使用,主要看个人习惯。
参考视频:
1.黑马程序员5天软件测试从入门到精通_软件测试基础教程
1. 新建first.html文件,输入代码
# <!doctype> 声明必须位于 HTML5 文档中的第一行,使用非常简单,如果没有特别指出是哪个版本,默认是H5
<!DOCTYPE html>
<html> # 整个html文件
<head>
<meta charset="UTF-8"> # 字符编码格式,声明编码,否则会出现乱码。
<title>The first title </title> # 网页头部信息
</head>
<body>
<h1> This is the h1 </h1> # 标题
<h2> This is the h2 </h2>
<h3> This is the h3 </h3>
<h4>This is the h4 </h4>
<h5> This is the h5 </h5>
<h6> This is the h6</h6>
<p>This is the passgae </p> # 段落,或者说文章
This is the normal word. # 正常文字输出
</body>
</html>
2. 页面展示
3. 总结
h: 代表标题信息,有六个级别
p: 代表段落,文章之类的信息
这是最简单入门例子,H5,标签语义化,都是由标签组成的。