Blogger Information
Blog 3
fans 0
comment 0
visits 1248
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML的基本语法和部分常用标签
烟灰
Original
417 people have browsed it

基本语法

  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>网页标题</title>
  8. <meta name="author" content="网页作者">
  9. <meta name="keywords" content="网页关键词">
  10. <meta name="description" content="网页描述信息">
  11. <style>
  12. /* 这里是CSS样式 */
  13. </style>
  14. </head>
  15. <body>
  16. 网页内容区域
  17. </body>
  18. <script>
  19. // 这里是JS代码
  20. </script>
  21. </html>

常用标签

  • 标题(行级元素)
    <h1></h1> 定义最大的标题 <h6></h6> 定义最小的标题
  • 段落(行级元素)
    <p></p>标签定义段落
  • 链接(块级元素)
    <a href="https://www.baidu.com/" target="_blank">百度</a>
    target 属性,定义链接的打开形式(本窗口、新窗口)
  • 图片
    `
    <img src="pulpit.jpg" alt="图片描述信息" width="图片宽度" height="图片高度">
  • 表格
    1. <table>
    2. <tr>
    3. <td</td>
    4. <td></td>
    5. </tr>
    6. <tr>
    7. <td></td>
    8. <td></td>
    9. </tr>
    10. </table>
  • 列表
    有序列表
    1. <ol>
    2. <li>京东</li>
    3. <li>淘宝</li>
    4. </ol>
    无序列表
    1. <ul>
    2. <li>京东</li>
    3. <li>淘宝</li>
    4. </ul>
    自定义列表
    1. <dl>
    2. <dt>京东</dt>
    3. <dd>- 京东金融</dd>
    4. <dt>淘宝</dt>
    5. <dd>- 淘宝商城</dd>
    6. </dl>
  • Iframe窗体
    1. <iframe src="https://www.php.cn/" frameborder="0" width="50%" height="200px"></iframe>
    frameborder 定义iframe表示是否显示边框
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