Blogger Information
Blog 1
fans 0
comment 0
visits 235
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html基础入门:html5文档架构与属性学习总结
JasonHQ
Original
235 people have browsed it

1. 写出html文档结构,并解释成员功能与作用

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. </body>
  11. </html>

1) <!DOCTYPE html>用来表示文件类型
2) <html lang="en">是根元素,表示语言,两个子元素分别是<head> </head><body> </body>
3) <head> </head>标签,是给浏览器和搜索引擎看的
4) <body> </body>标签,是给用户看的
5)<meta charset="UTF-8">包含几乎全部种类的语言
6)<meta name="viewport" content="width=device-width, initial-scale=1.0">视口设置
7) <title>Document</title>浏览器中该页面顶部的名称
8) body中,分为三个部分,header+main+footer


2. 演示布局元素, 重点是tag+class

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>0113作业</title>
  8. </head>
  9. <body>
  10. <div class="box">
  11. <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="">
  12. <p>综合实战</p>
  13. </div>
  14. </body>
  15. </html>

3. 演示图文的语义化解决方案

  1. <figure>
  2. <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="">
  3. <figcaption>综合实战</figcaption>
  4. </figure>

4. 演示图像,链接与列表元素

1) 图像

  1. <div class="box">
  2. <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="" height="260">
  3. </div>
  4. <hr>
2.1) 文字链接

  1. <div class="box">
  2. <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="" height="260">
  3. <a href="https://www.php.cn/course/1461.html">综合实战</a>
  4. </div>
2.2) 按钮链接

  1. <div class="box">
  2. <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="" width="300">
  3. <a href="https://www.php.cn/course/1461.html">
  4. <button>click here</button>
  5. </a>
2.3) 图片链接

  1. <div class="box">
  2. <a href="https://www.php.cn/course/1461.html"> <img src="https://img.php.cn/upload/course/000/000/001/63196859c23d0659.png" alt="" height="280"></a>
  3. </div>
3.1) 无序列表
  1. <ul>
  2. <li>无序列表第一行</li>
  3. <li>无序列表第二行</li>
  4. <li>无序列表第三行</li>
  5. </ul>
  6. <!-- ul>li*3{无序列表第$行} -->
3.2) 有序列表
  1. <ol>
  2. <li>有序列表第一行</li>
  3. <li>有序列表第一行</li>
  4. <li>有序列表第一行</li>
  5. </ol>
3.3) 自定义列表
  1. <dl>
  2. <dt>action</dt>
  3. <dd>行动</dd>
  4. </dl>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post