百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术文章 > 正文

HTML 入门--1

zhezhongyun 2025-02-08 13:46 44 浏览

benw

一、HTML 的基本概述

  • 定义与作用 :HTML 即超文本标记语言,是构成万维网基础的重要元素,主要定义网页内容的含义和结构,其他技术(如 CSS 用于表现与展示效果,JavaScript 用于功能与行为)则作为补充。超文本指的是连接单个或多个网站间网页的链接,它是网络的关键组成部分。
  • 标记与元素 :HTML 利用 “标记” 来标注文本、图片等各类内容,以便在浏览器中呈现,包含多种元素如 、、<body>、<header>、<footer>、<article>、<section>、<p>、<div>、<span>、<img>、<aside>、<audio>、<canvas>、<datalist>、<details>、<embed>、<nav>、<output>、<progress>、<video>、<ul>、<ol>、<li> 等。</li><li data-track="183"><strong>标签特点</strong> :通过 “标签” 将文本从文档中引出,由 “<”“>” 包裹元素名构成,HTML 标签里的元素名不区分大小写,一般推荐使用全部小写。</li></ul><p data-track="184"><strong>二、主要资源介绍</strong></p><ul><li data-track="185"><strong>HTML 介绍</strong> :为新手提供基础文章,讲解 HTML 概念及使用方法。</li><li data-track="186"><strong>HTML 教程</strong> :涵盖使用 HTML 的文章、教程和完整示例,可在 HTML 学习区查看。</li><li data-track="187"><strong>HTML 参考</strong> :包含了 HTML 每个元素和属性的详细信息,资源丰富。</li><li data-track="188"><strong>初学者教程</strong> :在 HTML 学习区有许多特色模块,可让学习者从零开始,无需先前经验掌握 HTML。</li></ul><p data-track="189"><strong>三、HTML 相关学习模块</strong></p><ul><li data-track="190"><strong>HTML 介绍模块</strong> :帮助学习者打下基础,掌握核心概念和语法,学会将 HTML 应用于文本、创建超链接及构建网页。</li><li data-track="191"><strong>多媒体与嵌入内容模块</strong> :探索在网页中包含多媒体内容的方式,如嵌入图片、视频、音频及其他网页。</li><li data-track="192"><strong>HTML 表格模块</strong> :教授如何以可理解且易于访问的形式在网页展示表格化数据,涵盖基本表格标记及一些复杂特性。</li><li data-track="193"><strong>HTML 表单模块</strong> :引导建立客户端 / 前端部分的表单,表单在网页交互中起到关键作用,如注册、登录、发送评论反馈等。</li></ul><p data-track="194"><strong>四、用 HTML 解决常见问题</strong></p><ul><li data-track="195">提供了常见问题解决方法的链接,涉及如何处理网页标题、添加图片或视频、强调内容、建立基本表单等在构建网页过程中的常见问题。</li></ul><p data-track="196"><strong>五、高级主题</strong></p><ul><li data-track="197"><strong>CORS 处理跨域图片</strong> :通过设置 crossorigin 属性和合适 CORS 标头,可以让 <img> 元素从外部来源加载并在 <canvas> 元素中如本地源一样使用图片。</li><li data-track="198"><strong>CORS 设置属性</strong> :支持 CORS 的 HTML 元素(如 <img> 或 <video>)具有 crossorigin 元素属性(或 crossOrigin 对象属性),用于配置其跨域获取资源的请求。</li><li data-track="199"><strong>使用 rel="preload" 预加载页面内容</strong> :通过设置 <link> 元素 rel 属性的值为 preload,在 HTML 的 <head> 部分声明需要在页面加载后即刻使用的资源,预加载资源,提升性能。</li></ul><p data-track="200"><strong>六、参考内容</strong></p><ul><li data-track="201"><strong>HTML 参考</strong> :HTML 由元素组成,每个元素可被多个属性修饰,文档通过链接相互连接。</li><li data-track="202"><strong>HTML 元素参考</strong> :提供了完整的 HTML 元素列表。</li><li data-track="203"><strong>HTML 属性参考</strong> :说明了 HTML 元素的属性,这些属性可以配置或调整元素行为。</li><li data-track="204"><strong>全局属性</strong> :可在所有 HTML 元素设置,即使元素不符合 HTML5 标准也允许这些属性存在。</li><li data-track="205"><strong>行级元素和块级元素</strong> :介绍了 HTML 元素的行级和块级特性,行级元素只占用被标签包裹的空间,块级元素占用父元素全部空间。</li><li data-track="206"><strong>链接类型</strong> :阐述了在 HTML 中用于确立文档间关系的各种链接类型,涉及的链接元素包括 <a>、<area> 和 <link>。</li><li data-track="207"><strong>Web 媒体类型和格式指南</strong> :指出了 <audio> 和 <video> 元素可原生播放音频和视频媒体,无需外部软件支持。</li><li data-track="208"><strong>HTML 内容种类</strong> :讲解了 HTML 包含的不同内容,以及它们在特定情景下有效的条件,还有可包含的类别和元素使用规则。</li><li data-track="209"><strong>怪异模式和标准模式</strong> :提供了关于这两种模式的历史信息。</li></ul></div> <div class="clearfix mb10"> <div class="share fr"> <div class="social-share mb20 ta-c" data-initialized="true"> <a href="#" class="social-share-icon iconfont icon-weibo"></a> <a href="#" class="social-share-icon iconfont icon-qq"></a> <a href="#" class="social-share-icon iconfont icon-wechat"></a> <a href="#" class="social-share-icon iconfont icon-qzone"></a> </div> <script src="http://www.zhezhongyun.com/zb_users/theme/tx_hao/script/social-share.min.js"></script> </div> <div class="info-tag"> <a href="http://www.zhezhongyun.com/tags-135.html" title="查看更多HTML5 标签内容" rel="tag" target="_blank">HTML5 标签</a> </div> </div> <div class="info-next"> <ul class="row"> <li class="col-12 col-m-24 mb10">上一篇:<a href="http://www.zhezhongyun.com/post/1950.html" title="以后好好学习天天向上">以后好好学习天天向上</a></li> <li class="col-12 col-m-24 ta-r mb10">下一篇:<a href="http://www.zhezhongyun.com/post/1952.html" title="保护用户Web隐私 HTTP referrer header是如何做到的?">保护用户Web隐私 HTTP referrer header是如何做到的?</a></li> </ul> </div> </div> <h2 class="tx-title">相关推荐</h2> <div class="home-news"> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5190.html" title="perl基础——循环控制_principle循环" class="f-black" target="_blank">perl基础——循环控制_principle循环</a></dt> <dd class="news-txt"> <p class="f-gray f-13">在编程中,我们往往需要进行不同情况的判断,选择,重复操作。这些时候我们需要对简单语句来添加循环控制变量或者命令。if/unless我们需要在满足特定条件下再执行的语句,可以通过if/unle...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5189.html" title="CHAPTER 2 The Antechamber of M de Treville 第二章 特雷维尔先生的前厅" class="f-black" target="_blank">CHAPTER 2 The Antechamber of M de Treville 第二章 特雷维尔先生的前厅</a></dt> <dd class="news-txt"> <p class="f-gray f-13">CHAPTER1TheThreePresentsofD'ArtagnantheElderCHAPTER2TheAntechamber...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5188.html" title="CHAPTER 5 The King&#39;S Musketeers and the Cardinal&#39;S Guards 第五章 国王的火枪手和红衣主教的卫士" class="f-black" target="_blank">CHAPTER 5 The King&#39;S Musketeers and the Cardinal&#39;S Guards 第五章 国王的火枪手和红衣主教的卫士</a></dt> <dd class="news-txt"> <p class="f-gray f-13">CHAPTER3TheAudienceCHAPTER5TheKing'SMusketeersandtheCardinal'SGuard...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5187.html" title="CHAPTER 3 The Audience 第三章 接见" class="f-black" target="_blank">CHAPTER 3 The Audience 第三章 接见</a></dt> <dd class="news-txt"> <p class="f-gray f-13">CHAPTER3TheAudienceCHAPTER3TheAudience第三章接见M.DeTrévillewasatt...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5186.html" title="别搞印象流!数据说明谁才是外线防守第一人!" class="f-black" target="_blank">别搞印象流!数据说明谁才是外线防守第一人!</a></dt> <dd class="news-txt"> <p class="f-gray f-13">来源:Reddit译者:@assholeeric编辑:伯伦WhoarethebestperimeterdefendersintheNBA?Here'sagraphofStea...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5185.html" title="V-Day commemorations prove anti-China claims hollow" class="f-black" target="_blank">V-Day commemorations prove anti-China claims hollow</a></dt> <dd class="news-txt"> <p class="f-gray f-13">People'sLiberationArmyhonorguardstakepartinthemilitaryparademarkingthe80thanniversary...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5184.html" title="EasyPoi使用_easypoi api" class="f-black" target="_blank">EasyPoi使用_easypoi api</a></dt> <dd class="news-txt"> <p class="f-gray f-13">EasyPoi的主要特点:1.设计精巧,使用简单2.接口丰富,扩展简单3.默认值多,writelessdomore4.springmvc支持,web导出可以简单明了使用1.easypoi...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5183.html" title="关于Oracle数据库12c 新特性总结_oracle数据库12514" class="f-black" target="_blank">关于Oracle数据库12c 新特性总结_oracle数据库12514</a></dt> <dd class="news-txt"> <p class="f-gray f-13">概述今天主要简单介绍一下Oracle12c的一些新特性,仅供参考。参考:http://docs.oracle.com/database/121/NEWFT/chapter12102.htm#NEWFT...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5182.html" title="【开发者成长】JAVA 线上故障排查完整套路!" class="f-black" target="_blank">【开发者成长】JAVA 线上故障排查完整套路!</a></dt> <dd class="news-txt"> <p class="f-gray f-13">线上故障主要会包括CPU、磁盘、内存以及网络问题,而大多数故障可能会包含不止一个层面的问题,所以进行排查时候尽量四个方面依次排查一遍。同时例如jstack、jmap等工具也是不囿于一个方面的问题...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5181.html" title="使用 Python 向多个地址发送电子邮件" class="f-black" target="_blank">使用 Python 向多个地址发送电子邮件</a></dt> <dd class="news-txt"> <p class="f-gray f-13">在本文中,我们将演示如何使用Python编程语言向使用不同电子邮件地址的不同收件人发送电子邮件。具体来说,我们将向许多不同的人发送电子邮件。使用Python向多个地址发送电子邮件Python...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5180.html" title="提高工作效率的--Linux常用命令,能够决解95%以上的问题" class="f-black" target="_blank">提高工作效率的--Linux常用命令,能够决解95%以上的问题</a></dt> <dd class="news-txt"> <p class="f-gray f-13">点击上方关注,第一时间接受干货转发,点赞,收藏,不如一次关注评论区第一条注意查看回复:Linux命令获取linux常用命令大全pdf+Linux命令行大全pdf为什么要学习Linux命令?1、因为Li...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5179.html" title="linux常用系统命令_linux操作系统常用命令" class="f-black" target="_blank">linux常用系统命令_linux操作系统常用命令</a></dt> <dd class="news-txt"> <p class="f-gray f-13">系统信息arch显示机器的处理器架构dmidecode-q显示硬件系统部件-(SMBIOS/DMI)hdparm-i/dev/hda罗列一个磁盘的架构特性hdparm-tT/dev/s...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5178.html" title="小白入门必知必会-PostgreSQL-15.2源码编译安装" class="f-black" target="_blank">小白入门必知必会-PostgreSQL-15.2源码编译安装</a></dt> <dd class="news-txt"> <p class="f-gray f-13">一PostgreSQL编译安装1.1下载源码包在PostgreSQL官方主页https://www.postgresql.org/ftp/source/下载区选择所需格式的源码包下载。cd/we...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5177.html" title="Linux操作系统之常用命令_linux系统常用命令详解" class="f-black" target="_blank">Linux操作系统之常用命令_linux系统常用命令详解</a></dt> <dd class="news-txt"> <p class="f-gray f-13">Linux操作系统一、常用命令1.系统(1)系统信息arch显示机器的处理器架构uname-m显示机器的处理器架构uname-r显示正在使用的内核版本dmidecode-q显示硬件系...</p> </dd> </dl> <dl class="news-box clearfix pd20 "> <dt class="f-18 mb10"><a href="http://www.zhezhongyun.com/post/5176.html" title="linux网络命名空间简介_linux 网络相关命令" class="f-black" target="_blank">linux网络命名空间简介_linux 网络相关命令</a></dt> <dd class="news-txt"> <p class="f-gray f-13">此篇会以例子的方式介绍下linux网络命名空间。此例中会创建两个networknamespace:nsa、nsb,一个网桥bridge0,nsa、nsb中添加网络设备veth,网络设备间...</p> </dd> </dl> </div> </div> <div class="side-box col-6 col-m-24 col2-"> <dl class="side-hot"> <dt>一周热门</dt> <dd> <ul> <li> <a href="http://www.zhezhongyun.com/post/513.html" title="b端详情页:各种信息聚集地,设计师要如何规划这一亩三分地呢" target="_blank"> <h2 class="f-15">b端详情页:各种信息聚集地,设计师要如何规划这一亩三分地呢</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1123.html" title="漏洞系列一一看我一招征服漏洞 SSRF" target="_blank"> <h2 class="f-15">漏洞系列一一看我一招征服漏洞 SSRF</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1120.html" title="Web前端需要学什么?Web前端开发需要学习哪些?" target="_blank"> <h2 class="f-15">Web前端需要学什么?Web前端开发需要学习哪些?</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1118.html" title="接口测试遇到500报错?别慌,你的头部可能有点问题" target="_blank"> <h2 class="f-15">接口测试遇到500报错?别慌,你的头部可能有点问题</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1689.html" title="前端Flex布局可视化布局工具介绍,vue和html5快速设计利器" target="_blank"> <h2 class="f-15">前端Flex布局可视化布局工具介绍,vue和html5快速设计利器</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1140.html" title="「资讯」为强迫用户使用Edge浏览器,微软又出新招数" target="_blank"> <h2 class="f-15">「资讯」为强迫用户使用Edge浏览器,微软又出新招数</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1682.html" title="HTML 简介(html简介及优缺点)" target="_blank"> <h2 class="f-15">HTML 简介(html简介及优缺点)</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1242.html" title="HBuilderX,uni-app创建HTML5项目,同时支持浏览器和移动端" target="_blank"> <h2 class="f-15">HBuilderX,uni-app创建HTML5项目,同时支持浏览器和移动端</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1499.html" title="现在页面实时聊天都使用Websocket技术实现吗?" target="_blank"> <h2 class="f-15">现在页面实时聊天都使用Websocket技术实现吗?</h2> </a> </li> <li> <a href="http://www.zhezhongyun.com/post/1684.html" title="关于HTML5被简称做H5,你怎么看?(html5缩写)" target="_blank"> <h2 class="f-15">关于HTML5被简称做H5,你怎么看?(html5缩写)</h2> </a> </li> </ul> </dd> </dl> <dl class="function" id="divPrevious"> <dt class="function_t">最近发表</dt><dd class="function_c"> <ul><li><a title="perl基础——循环控制_principle循环" href="http://www.zhezhongyun.com/post/5190.html">perl基础——循环控制_principle循环</a></li> <li><a title="CHAPTER 2 The Antechamber of M de Treville 第二章 特雷维尔先生的前厅" href="http://www.zhezhongyun.com/post/5189.html">CHAPTER 2 The Antechamber of M de Treville 第二章 特雷维尔先生的前厅</a></li> <li><a title="CHAPTER 5 The King&#39;S Musketeers and the Cardinal&#39;S Guards 第五章 国王的火枪手和红衣主教的卫士" href="http://www.zhezhongyun.com/post/5188.html">CHAPTER 5 The King&#39;S Musketeers and the Cardinal&#39;S Guards 第五章 国王的火枪手和红衣主教的卫士</a></li> <li><a title="CHAPTER 3 The Audience 第三章 接见" href="http://www.zhezhongyun.com/post/5187.html">CHAPTER 3 The Audience 第三章 接见</a></li> <li><a title="别搞印象流!数据说明谁才是外线防守第一人!" href="http://www.zhezhongyun.com/post/5186.html">别搞印象流!数据说明谁才是外线防守第一人!</a></li> <li><a title="V-Day commemorations prove anti-China claims hollow" href="http://www.zhezhongyun.com/post/5185.html">V-Day commemorations prove anti-China claims hollow</a></li> <li><a title="EasyPoi使用_easypoi api" href="http://www.zhezhongyun.com/post/5184.html">EasyPoi使用_easypoi api</a></li> <li><a title="关于Oracle数据库12c 新特性总结_oracle数据库12514" href="http://www.zhezhongyun.com/post/5183.html">关于Oracle数据库12c 新特性总结_oracle数据库12514</a></li> <li><a title="【开发者成长】JAVA 线上故障排查完整套路!" href="http://www.zhezhongyun.com/post/5182.html">【开发者成长】JAVA 线上故障排查完整套路!</a></li> <li><a title="使用 Python 向多个地址发送电子邮件" href="http://www.zhezhongyun.com/post/5181.html">使用 Python 向多个地址发送电子邮件</a></li> </ul> </dd> </dl> <dl class="function" id="divTags"> <dt class="function_t">标签列表</dt><dd class="function_c"> <ul><li><a title="HTML 教程" href="http://www.zhezhongyun.com/tags-1.html">HTML 教程<span class="tag-count"> (33)</span></a></li> <li><a title="HTML 简介" href="http://www.zhezhongyun.com/tags-3.html">HTML 简介<span class="tag-count"> (35)</span></a></li> <li><a title="HTML 实例/测验" href="http://www.zhezhongyun.com/tags-46.html">HTML 实例/测验<span class="tag-count"> (32)</span></a></li> <li><a title="HTML 测验" href="http://www.zhezhongyun.com/tags-47.html">HTML 测验<span class="tag-count"> (32)</span></a></li> <li><a title="JavaScript 和 HTML DOM 参考手册" href="http://www.zhezhongyun.com/tags-54.html">JavaScript 和 HTML DOM 参考手册<span class="tag-count"> (32)</span></a></li> <li><a title="HTML 拓展阅读" href="http://www.zhezhongyun.com/tags-55.html">HTML 拓展阅读<span class="tag-count"> (30)</span></a></li> <li><a title="HTML文本框样式" href="http://www.zhezhongyun.com/tags-60.html">HTML文本框样式<span class="tag-count"> (31)</span></a></li> <li><a title="HTML滚动条样式" href="http://www.zhezhongyun.com/tags-61.html">HTML滚动条样式<span class="tag-count"> (34)</span></a></li> <li><a title="HTML5 浏览器支持" href="http://www.zhezhongyun.com/tags-113.html">HTML5 浏览器支持<span class="tag-count"> (33)</span></a></li> <li><a title="HTML5 新元素" href="http://www.zhezhongyun.com/tags-114.html">HTML5 新元素<span class="tag-count"> (33)</span></a></li> <li><a title="HTML5 WebSocket" href="http://www.zhezhongyun.com/tags-131.html">HTML5 WebSocket<span class="tag-count"> (30)</span></a></li> <li><a title="HTML5 代码规范" href="http://www.zhezhongyun.com/tags-132.html">HTML5 代码规范<span class="tag-count"> (32)</span></a></li> <li><a title="HTML5 标签" href="http://www.zhezhongyun.com/tags-135.html">HTML5 标签<span class="tag-count"> (717)</span></a></li> <li><a title="HTML5 标签 (已废弃)" href="http://www.zhezhongyun.com/tags-137.html">HTML5 标签 (已废弃)<span class="tag-count"> (75)</span></a></li> <li><a title="HTML5电子书" href="http://www.zhezhongyun.com/tags-141.html">HTML5电子书<span class="tag-count"> (32)</span></a></li> <li><a title="HTML5开发工具" href="http://www.zhezhongyun.com/tags-142.html">HTML5开发工具<span class="tag-count"> (34)</span></a></li> <li><a title="HTML5小游戏源码" href="http://www.zhezhongyun.com/tags-143.html">HTML5小游戏源码<span class="tag-count"> (34)</span></a></li> <li><a title="HTML5模板下载" href="http://www.zhezhongyun.com/tags-144.html">HTML5模板下载<span class="tag-count"> (30)</span></a></li> <li><a title="HTTP 状态消息" href="http://www.zhezhongyun.com/tags-159.html">HTTP 状态消息<span class="tag-count"> (33)</span></a></li> <li><a title="HTTP 方法:GET 对比 POST" href="http://www.zhezhongyun.com/tags-160.html">HTTP 方法:GET 对比 POST<span class="tag-count"> (33)</span></a></li> <li><a title="键盘快捷键" href="http://www.zhezhongyun.com/tags-168.html">键盘快捷键<span class="tag-count"> (35)</span></a></li> <li><a title="标签" href="http://www.zhezhongyun.com/tags-171.html">标签<span class="tag-count"> (226)</span></a></li> <li><a title="HTML button formtarget 属性" href="http://www.zhezhongyun.com/tags-218.html">HTML button formtarget 属性<span class="tag-count"> (30)</span></a></li> <li><a title="opacity 属性" href="http://www.zhezhongyun.com/tags-319.html">opacity 属性<span class="tag-count"> (32)</span></a></li> <li><a title="transition 属性" href="http://www.zhezhongyun.com/tags-360.html">transition 属性<span class="tag-count"> (33)</span></a></li> </ul> </dd> </dl> </div> </div> </div> </div> <div class="footer"> <div class="wide ta-c f-12"> </div> </div> <div class="fixed-box "> <ul> <li class="pchide wapflex"><a href="http://www.zhezhongyun.com/"><i class="fa fa-home"></i> 首页</a></li> <li><a href="http://www.zhezhongyun.com/shoulu.html" title="收录申请" target="_blank"><i class="fa fa-chain-broken mr5"></i>收录</a></li> <li><span class="gotop"><i class="fa fa-caret-up mr5"></i> 顶部</span></li> </ul> </div> <script src="http://www.zhezhongyun.com/zb_users/theme/tx_hao/script/txcstx.min.js?v=2024-12-04"></script> </body> </html><!--148.73 ms , 13 queries , 3721kb memory , 0 error-->