目录

HTML5

HTML5介绍

HTML5的DOCTYPE声明

HTML5基本骨架

html标签

head标签

body标签

title标签

meta标签

在vscode中写出第一个小框架


HTML5

HTML5介绍

HTML5是用来描述网页的一种语言,被称为超文本标记语言。用HTML5编写的文件,后缀以.html结尾

HTML是一种标记语言,标记语言是一套标记标签。标签是由尖括号包围的关键字,例如:

标签有两种表现形式:

  1. 双标签,例如:
  2. 单标签,例如:

    HTML5基本骨架

    html标签

    定义 HTML 文档,这个元素我们浏览器看到后就明白这是个HTML文档了,所以你的其它元素要包裹在它里面,标签限定了文档的开始点和结束点。

    head标签

    head标签用于定义文档的头部。文档的头部描述了文档的各种属性和信息,包括文档的标题、在 Web 中的位置以及和其他文档的关系等。绝大多数文档头部包含的数据都不会真正作为内容显示给读者。

    body标签

    body 元素定义文档的主体。

    body 元素包含文档的所有内容(比如文本、超链接、图像、表格和列表等等。)

    它会直接在页面中显示出来,也就是用户可以直观看到的内容

     我会显示在浏览器中

    title标签

    1. 可定义文档的标题。
    2. 它显示在浏览器窗口的标题栏或状态栏上。
    3. </code>标签是<code></code>标签中唯一必须要求包含的东西,就是说写head一定要写title</li><li><code><title></code>的增加有利于SEO优化</li></ol><blockquote><p>SEO是搜索引擎优化的英文缩写。通过对网站内容调整,满足搜索引擎的排名需求</p></blockquote><pre><code class="language-html"><title>第一个页面 我会显示在浏览器中

      meta标签

      meta标签用来描述一个HTML网页文档的属性,关键词等,例如:charset="utf-8"是说当前使用的是utf-8编码格式,在开发中我们经常会看到utf-8,或是gbk,这些都是编码格式,通常使用utf-8

      itbaizhan

      在vscode中写出第一个小框架

      其实在vscode中框架不需要编写,只需要打出HTML就会自动生成一个基本的框架。

      先创建一个html文件,后缀为.html

      然后就会出现:

      在body中输入的内容可以直接在网页中显示出来。

      更详细的框架

         My Basic HTML5 Framework   

      Welcome to My Website

      About Us

      We are a passionate team...

      Our Services

      • Web Design
      • Graphic Design
      • Development

      © 2023 My Company. All rights reserved.

      1. :这是文档类型声明,指定了你在使用HTML5。

      2. 标签:用于设置字符编码和视口设置,确保网页在不同设备上显示正常。

      3. </code>标签:定义网页标题,显示在浏览器标签页上。</strong></p></li><li><p><strong><code></code>和<code></code>标签:用于引入外部样式表和JavaScript文件,这样可以将样式和脚本与HTML内容分离,使代码更有组织性。</strong></p></li><li><p><strong>页面主体部分包括<code></p><header></code>、<code><main></code>和<code></p><footer></code>:这些标签用于组织网页的头部、主体内容和页脚。</strong></p></li><li><p><strong>在主体中的<code></p><header></code>包含网页标题和导航菜单。</strong></p></li><li><p><strong><code><main></code>标签用于包含网页的主要内容,其中有两个<code></p><section></code>标签,每个标签包含一个标题和内容。</strong></p></li><li><p><strong>在页脚部分的<code></p><footer></code>标签中,显示版权信息。</strong></p></li></ol><p>在接下来的学习中,我们也将会以这个为模板对各个部分刨析学习。</p></article></div><div class="related-posts"><h2 class="related-posts-title"><i class="fab fa-hive me-1"></i>相关文章</h2><div class="row g-2 g-md-3 row-cols-2 row-cols-md-3 row-cols-lg-4"><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/45194/" title="如何解决`load_boston` has been removed from scikit-learn since version 1.2." data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/f279954c0e6f42e8a604a921744ea5b9.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/45194/" title="如何解决`load_boston` has been removed from scikit-learn since version 1.2.">如何解决`load_boston` has been removed from scikit-learn since version 1.2.</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/16802/" title="【pytorch】深度学习所需算力估算:flops及模型参数量" data-bg="/wp-content/themes/ripro-v5/assets/img/thumb.jpg"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/16802/" title="【pytorch】深度学习所需算力估算:flops及模型参数量">【pytorch】深度学习所需算力估算:flops及模型参数量</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/18284/" title="miniob源码 架构概览" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/b3b47b7a75d3ab440e97fce0aebeafa4.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/18284/" title="miniob源码 架构概览">miniob源码 架构概览</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/47589/" title="瓦片地图编辑器——实现卡马克卷轴的编辑,键盘控制游戏移动和鼠标点击游戏编辑通过同一个视口实现。" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/13ff14b8e2c942c0a3c6088dfe795fee.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/47589/" title="瓦片地图编辑器——实现卡马克卷轴的编辑,键盘控制游戏移动和鼠标点击游戏编辑通过同一个视口实现。">瓦片地图编辑器——实现卡马克卷轴的编辑,键盘控制游戏移动和鼠标点击游戏编辑通过同一个视口实现。</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/26470/" title="SQL注入之HTTP头部注入" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/e46d62d9538b4e98b6cb8b91bd6aae2d.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/26470/" title="SQL注入之HTTP头部注入">SQL注入之HTTP头部注入</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/8619/" title="讲讲vue3下会造成响应式丢失的情况" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/3eeb2c5bec44424da347971f2cb7ffbf.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/8619/" title="讲讲vue3下会造成响应式丢失的情况">讲讲vue3下会造成响应式丢失的情况</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/14917/" title="SQL Server2022版+SSMS安装教程(保姆级)" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/433a1bb457d84a265b30e2272e1df8c9.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/14917/" title="SQL Server2022版+SSMS安装教程(保姆级)">SQL Server2022版+SSMS安装教程(保姆级)</a></h2></div></article></div><div class="col"><article class="post-item item-grid"><div class="tips-badge position-absolute top-0 start-0 z-1 m-2"></div><div class="entry-media ratio ratio-3x2"> <a target="" class="media-img lazy bg-cover bg-center" href="https://www.maxssl.com/article/31098/" title="一台电脑(windows)安装两个版本MYSQL方法" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/c878542c1bab42c49c608fb2d0242815.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/31098/" title="一台电脑(windows)安装两个版本MYSQL方法">一台电脑(windows)安装两个版本MYSQL方法</a></h2></div></article></div></div></div></div><div class="sidebar-wrapper col-md-12 col-lg-3 h-100" data-sticky><div class="sidebar"><div id="recent-posts-4" class="widget widget_recent_entries"><h5 class="widget-title">最新关注</h5><ul><li> <a href="https://www.maxssl.com/article/57859/">【MySQL】InnoDB存储引擎</a></li><li> <a href="https://www.maxssl.com/article/57858/">DB-GPT:强强联合Langchain-Vicuna的应用实战开源项目,彻底改变与数据库的交互方式</a></li><li> <a href="https://www.maxssl.com/article/57857/">TigerBeetle:世界上最快的会计数据库</a></li><li> <a href="https://www.maxssl.com/article/57856/">【SQL server】玩转SQL server数据库:第三章 关系数据库标准语言SQL(二)数据查询</a></li><li> <a href="https://www.maxssl.com/article/57855/">马斯克400条聊天记录被法院公开,原来推特收购是在短信上谈崩的</a></li><li> <a href="https://www.maxssl.com/article/57854/">戏精摩根大通:从唱空比特币到牵手贝莱德</a></li></ul></div><div id="ri_sidebar_posts_widget-2" class="widget sidebar-posts-list"><h5 class="widget-title">热文推荐</h5><div class="row g-3 row-cols-1"><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/54585/" title="华为OD机试 – 矩阵匹配(Java & JS & Python & C & C++)" data-bg="/wp-content/themes/ripro-v5/assets/img/thumb.jpg"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/54585/" title="华为OD机试 – 矩阵匹配(Java & JS & Python & C & C++)">华为OD机试 – 矩阵匹配(Java & JS & Python & C & C++)</a></h2></div></div></article></div><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/54193/" title="区块链系统权限控制-添加委员账号" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/c712237ac67540299d744eb7a9c061d4.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/54193/" title="区块链系统权限控制-添加委员账号">区块链系统权限控制-添加委员账号</a></h2></div></div></article></div><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/57156/" title="AI论文查重率怎么降低?七个实用建议助你顺利过关" data-bg="https://img.maxssl.com/uploads/?url=https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/559bf93cc70d48cfb250ab6a7b7338d9.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/57156/" title="AI论文查重率怎么降低?七个实用建议助你顺利过关">AI论文查重率怎么降低?七个实用建议助你顺利过关</a></h2></div></div></article></div><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/2533/" title="以TrueType为例谈字形描述" data-bg="https://img.maxssl.com/uploads/?url=https://img2022.cnblogs.com/blog/2536068/202209/2536068-20220920191221434-164302812.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/2533/" title="以TrueType为例谈字形描述">以TrueType为例谈字形描述</a></h2></div></div></article></div><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/49674/" title="VOC/YOLO/COCO数据集格式转换及LabelImg/Labelme/精灵标注助手Colabeler标注工具介绍" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/3e853a47148541b2aa6e18eaad0dd401.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/49674/" title="VOC/YOLO/COCO数据集格式转换及LabelImg/Labelme/精灵标注助手Colabeler标注工具介绍">VOC/YOLO/COCO数据集格式转换及LabelImg/Labelme/精灵标注助手Colabeler标注工具介绍</a></h2></div></div></article></div><div class="col"><article class="post-item item-list"><div class="entry-media ratio ratio-3x2 col-auto"> <a target="" class="media-img lazy" href="https://www.maxssl.com/article/27599/" title="编程主要学什么" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/66f42dfd4fce20b1ac9774bd00ff78c3.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/27599/" title="编程主要学什么">编程主要学什么</a></h2></div></div></article></div></div></div></div></div></div></div></main><footer class="site-footer py-md-4 py-2 mt-2 mt-md-4"><div class="container"><div class="text-center small w-100"><div>Copyright © <script>today=new Date();document.write(today.getFullYear());</script> maxssl.com 版权所有 <a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">浙ICP备2022011180号</a></div><div class=""><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7656930379472324" crossorigin="anonymous"></script></div></div></div></footer><div class="rollbar"><ul class="actions"><li><a target="" href="https://www.maxssl.com/" rel="nofollow noopener noreferrer"><i class="fas fa-home"></i><span></span></a></li><li><a target="" href="http://wpa.qq.com/msgrd?v=3&uin=6666666&site=qq&menu=yes" rel="nofollow noopener noreferrer"><i class="fab fa-qq"></i><span></span></a></li></ul></div><div class="back-top"><i class="fas fa-caret-up"></i></div><div class="dimmer"></div><div class="off-canvas"><div class="canvas-close"><i class="fas fa-times"></i></div><div class="logo-wrapper"> <a class="logo text" href="https://www.maxssl.com/">MaxSSL</a></div><div class="mobile-menu d-block d-lg-none"></div></div> <script></script><noscript><style>.lazyload{display:none}</style></noscript><script data-noptimize="1">window.lazySizesConfig=window.lazySizesConfig||{};window.lazySizesConfig.loadMode=1;</script><script async data-noptimize="1" src='https://www.maxssl.com/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js'></script><script src='//cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js' id='jquery-js'></script> <script src='//cdn.bootcdn.net/ajax/libs/highlight.js/11.7.0/highlight.min.js' id='highlight-js'></script> <script src='https://www.maxssl.com/wp-content/themes/ripro-v5/assets/js/vendor.min.js' id='vendor-js'></script> <script id='main-js-extra'>var zb={"home_url":"https:\/\/www.maxssl.com","ajax_url":"https:\/\/www.maxssl.com\/wp-admin\/admin-ajax.php","theme_url":"https:\/\/www.maxssl.com\/wp-content\/themes\/ripro-v5","singular_id":"25188","post_content_nav":"0","site_notify_auto":"0","current_user_id":"0","ajax_nonce":"fc04a3d279","gettext":{"__copypwd":"\u5bc6\u7801\u5df2\u590d\u5236\u526a\u8d34\u677f","__copybtn":"\u590d\u5236","__copy_succes":"\u590d\u5236\u6210\u529f","__comment_be":"\u63d0\u4ea4\u4e2d...","__comment_succes":"\u8bc4\u8bba\u6210\u529f","__comment_succes_n":"\u8bc4\u8bba\u6210\u529f\uff0c\u5373\u5c06\u5237\u65b0\u9875\u9762","__buy_be_n":"\u8bf7\u6c42\u652f\u4ed8\u4e2d\u00b7\u00b7\u00b7","__buy_no_n":"\u652f\u4ed8\u5df2\u53d6\u6d88","__is_delete_n":"\u786e\u5b9a\u5220\u9664\u6b64\u8bb0\u5f55\uff1f"}};</script> <script src='https://www.maxssl.com/wp-content/themes/ripro-v5/assets/js/main.min.js' id='main-js'></script> </body></html>