01.HTML基本结构
1.版本声明,告诉浏览器按照h5规范解析当前文档
<!DOCTYPE html>
2.根标签
<html lang = "en">
</html>
3.头部
<head> <meta charset = "UTF-8"> 网页编码(元信息) <meta name = "keywords" content = ""> 网页关键字 <meta name = "desperation" content = ""> 网页描述
<title></title>
</head>
3.身体
<body> </body>
4.块级元素(标签)
- div、p、ulolli、dldtdd、h、hr、br
- 特点:独占一行、设置宽高、嵌套行(块)元素
5.行级元素
- span、a、em、strong、biu、
- 特点:一行多个、设置宽高无效、只能嵌套行元素(a能嵌套块但不能嵌套a)
- 特殊:img、input、textarea可以设置宽高(相当于替代元素)
6.行内块元素
7.img
<img src = "" title = "" alt = "">
8.a
<a href = "" title = "" target = "" >
9.form
<form acition = "" method = ""></form>
10.input
<input type = "text" name = username value = "">
<input type = "password" name = "password" value = "">
<input type = "checkbox" name = "" value = "">
<input type = "radio" name = "" value = "">
<input type = "file" name = "" >
<input type = "hidden" name = "" value = "">
<input type = "button" name = "" value = "">
10.label
<label><input type = "" name = ""></label>
<label for = ""></label> <input type = "" name = "" id = "">
11.section
<section> <option></option> </section>
12.button
<button></button>
13.table
<table> <caption></caption> <tr> <th></th> </tr> <tr> <td></td> </tr> </table>
14.面试题
### 08. 常见的面试题(慢慢掌握) 01. 你做的页面在哪些流览器测试过?这些浏览器的内核分别是什么 02. DOCTYPE 的作用是什么
03. div+css 的布局较 table 布局有什么优点 04. img 的 alt 与 title 有何异同?
05. 简述一下 src 与 href 的区别
06. html元素的分类
07. 前端页面有哪三层构成,分别是什么?作用是什么?
08. html标签的语义化
09. SEO是什么?作为前端我们应该怎么做?
标签:02,img,元素,基础,宽高,嵌套,HTML From: https://www.cnblogs.com/webCat/p/17148457.html