目录

一、什么是HTML

二、HTML的基本结构:

三、结构与属性:

四、常见标签:


一、什么是HTML

HTML:超文本标记语言(HyperText Markup Language)
超文本:指的是网页中可以显示的内容(图片,超链接,视频…)
标记语言:标记–>标签(标注)买东西–>商品标签(价格,材质,型号…)
标记语言中,就是提供了许多的标签,不同标签有不同的功能,
最终运行时,由浏览器对标前进行解析,最终呈现出不同标签的样子

二、HTML的基本结构:

ARuiiiiiii

1.:声明html语言的版本 html5

2.:html标签是标记语言中根标签

3.:head 为标签头

4.:是设定编码形式,UTF-8 就是在互联网上使用最广的一种 Unicode 的实现方式。

5.</strong>:title是设置标题</p><p><strong>6.</strong>:网页身体,可以在其中编写可见所需内容</p><h3>三、结构与属性:</h3><p>在讲常用标签之前,来解释一下标签相关知识点:</p><p><strong>标签结构:</strong><br /> 标签体双标签<br /> 自闭合标签,没有修饰的内容,只是完成某个功能单标签</p><p><strong>注意:双标签的”/”在结束标签之前,单标签”/”在标签名之后</strong></p><p><strong></strong></p><pre><code class="language-html"><b>aaa</b><br /></code></pre><p><strong>标签的属性:</strong></p><p>可以通过改变标签属性,设置标签显示的格式<br /> 属性必须写在开始标签中<br /> 属性格式 属性名=”值”<br /> 一个标签中可以写多个属性</p><p>例如:</p><pre><code class="language-html"><font color="blue" size="4">百度</font></code></pre><p>就是设定标签体(即:百度)的颜色和大小</p><p>标签也可改变属性:</p><pre><code class="language-html"></code></pre><p>bgcolor=”blue”即将整个网页背景改为蓝色</p><h3>四、常见标签:</h3><p><strong>1.标题标签:</strong></p><p><h1></h1><p>…</p><h6></h6><p> 每一个标题标签会独占一行<br /> align=”” 控制标签内容在标签体中水平对齐方式(align=”center”即水平居中)</p><pre><code class="language-html"><h1>一级标题</h1><h2>二级标题</h2><h3>三级标题</h3><h1 align="center"><font>1级标签</font></h1><h2 align="right">2级标签</h2></code></pre><p>图示:</p><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/79e60278612d427d8b718c8e903691a7.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/79e60278612d427d8b718c8e903691a7.png" /></p><p> <strong> 2.标尺线:</strong>换行标签</p><hr /><p>用于换行加分割线</p><p><strong>3.段落标签:</strong></p><pre><code class="language-html"><hr /><p>二叉搜索树是一种数据结构,用于存储数据并支持快速的插入、删除和搜索操作。它是一种树形结构。</p><p>二叉搜索树的高效性与其关键字的特性密切相关。</p></code></pre><p>图示:</p><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/070bc342dc884dca9352a0a8784d7950.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/070bc342dc884dca9352a0a8784d7950.png" /></p><p><strong>4.列表:</strong></p><p>无序列表:</p><ul></ul></p><p>即标签体呈现的内容前没有序号,自动换行</p><p>有序列表:</p><ol></ol></p><p>即标签体呈现的内容前有序号,自动换行</p><pre><code class="language-html">列表无序列表<ul type="square"><li>列表1</li><li>列表2</li><li>列表3</li><li>列表4</li></ul>有序列表<ol><li>列表5</li><li>列表6</li><li>列表7</li><li>列表8</li></ol></code></pre><p>图示:</p><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/4b66452ea1934530a846711612b7a7b9.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/4b66452ea1934530a846711612b7a7b9.png" /></p><p><strong>5.超链接:</strong></p><p>:HTML 使用超级链接与网络上的另一个文档相连,通俗的说就是通过连接来访问其他网页资源</p><p>href=”网页的地址”<br /> target=”_blank”在新窗口打开目标网页<br /> target=”_self”在当前窗口打开一个新网页 (target:默认值为_self)</p><pre><code class="language-html">百度</code></pre><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/0b388ff7adb241abbf685803e8d72917.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/0b388ff7adb241abbf685803e8d72917.png" /></p><p>点击标签体“百度”后就会跳到地址对应的页面</p><p>6.图像标签:</p><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/e894d09e3e7f43aea26f2f7cada1590a.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/e894d09e3e7f43aea26f2f7cada1590a.png" /></p><p>7.特殊符号转义:</p><p>在HTML中预留了一些字符,这些预留字符是不能在网页中直接使用的,例如空格或一些特殊标志。</p><p>1)&lt和&bt:分别代表符号“”</p><p>2)&nbsp代表一个空格</p><p>3)&reg表示注册商标</p><p>4)&copy表示版权</p><pre><code class="language-html"><b>标签的功能是加粗文字<hr />®©</code></pre><p>图示:</p><p><noscript><img decoding="async" class="aligncenter" src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/9b7a5255fcb5405fa0ce87c89e14e1ee.png" /></noscript><img decoding="async" class="lazyload aligncenter" src='data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20210%20140%22%3E%3C/svg%3E' data-src="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/9b7a5255fcb5405fa0ce87c89e14e1ee.png" /></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/57113/" title="架构07- 理理解架构的模式1" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/fef6ee640e09432c9d91ed676e6ecc8c.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/57113/" title="架构07- 理理解架构的模式1">架构07- 理理解架构的模式1</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/25857/" title="用Python实现淘宝京东毫秒级秒杀,看谁还能抢过我" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/c4ee005831694321938f95a1cc34f2b2.jpeg"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/25857/" title="用Python实现淘宝京东毫秒级秒杀,看谁还能抢过我">用Python实现淘宝京东毫秒级秒杀,看谁还能抢过我</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/24918/" title="产品代码都给你看了,可别再说不会DDD(一):DDD入门" data-bg="https://img.maxssl.com/uploads/?url=https://docs.mryqr.com/images/118-it/ddd/ddd-books.jpeg"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/24918/" title="产品代码都给你看了,可别再说不会DDD(一):DDD入门">产品代码都给你看了,可别再说不会DDD(一):DDD入门</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/50497/" title="【微服务】对Dubbo核心架构了解多少?" 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/50497/" title="【微服务】对Dubbo核心架构了解多少?">【微服务】对Dubbo核心架构了解多少?</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/48549/" title="【Redis】利用 Redis List 实现 Java 数据库分页快速查询" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/direct/17c6e8f91fef47dda56973afbe240156.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/48549/" title="【Redis】利用 Redis List 实现 Java 数据库分页快速查询">【Redis】利用 Redis List 实现 Java 数据库分页快速查询</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/17646/" title="TIDB简介及基础架构" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/2490dee349394bf08d722e43dd21a341.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/17646/" title="TIDB简介及基础架构">TIDB简介及基础架构</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/33122/" title="掌握 JavaScript:从初学者到高级开发者的完整指南(一)" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/ccd246be9e15461c9b18e0d94abb7656.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/33122/" title="掌握 JavaScript:从初学者到高级开发者的完整指南(一)">掌握 JavaScript:从初学者到高级开发者的完整指南(一)</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/850/" title="Java私活300元,完成JavaWeb志愿者管理系统(四)" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/5b12228711d40bea9b57d8c12a92b58b.png"> </a></div><div class="entry-wrapper"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/850/" title="Java私活300元,完成JavaWeb志愿者管理系统(四)">Java私活300元,完成JavaWeb志愿者管理系统(四)</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/10700/" title="基于Java+SpringBoot+Vue前后端分离仓库管理系统设计实现" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/b61dfc27ff054fa9a0e0dc150dcf462a.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/10700/" title="基于Java+SpringBoot+Vue前后端分离仓库管理系统设计实现">基于Java+SpringBoot+Vue前后端分离仓库管理系统设计实现</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/19683/" title="Map集合的遍历方式(3种)" 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/19683/" title="Map集合的遍历方式(3种)">Map集合的遍历方式(3种)</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/46414/" title="R语言【utils】——write.table(),write.csv(),write.csv2():将数据写入文件" 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/46414/" title="R语言【utils】——write.table(),write.csv(),write.csv2():将数据写入文件">R语言【utils】——write.table(),write.csv(),write.csv2():将数据写入文件</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/13705/" title="Java中为什么重写equals()也需要重写hashCode()?" 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/13705/" title="Java中为什么重写equals()也需要重写hashCode()?">Java中为什么重写equals()也需要重写hashCode()?</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/7421/" title="章鱼网络进展月报 | 2022.8.1-8.31" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/30d8f328d0affdbff91dbe17dc0c525c.jpeg"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/7421/" title="章鱼网络进展月报 | 2022.8.1-8.31">章鱼网络进展月报 | 2022.8.1-8.31</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/46641/" title="第4章-IP基本原理" data-bg="https://img.maxssl.com/uploads/?url=https://img-blog.csdnimg.cn/img_convert/99163b8cfdd3aa8229f5a7ff115a44c2.png"></a></div><div class="entry-wrapper"><div class="entry-body"><h2 class="entry-title"> <a target="" href="https://www.maxssl.com/article/46641/" title="第4章-IP基本原理">第4章-IP基本原理</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":"43548","post_content_nav":"0","site_notify_auto":"0","current_user_id":"0","ajax_nonce":"2b42c86338","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>