HTML(超文本标记语言)
HTML 是万维网的基础标记语言。它使用元素来构建内容,包括标题、段落、链接、图像、表单和多媒体。每个网页都是一个由浏览器解析并渲染为可视内容的 HTML 文档。
MIME 类型
text/html
类型
文本
压缩
无损
优点
- + Universal support in every web browser and email client
- + Semantic elements improve accessibility and SEO
- + Extensible with CSS for styling and JavaScript for interactivity
- + Human-readable source that is easy to inspect and debug
缺点
- − Verbose syntax compared to Markdown for simple content
- − Rendering inconsistencies between browsers require testing
- − Static HTML alone has limited interactivity without JavaScript
何时使用 .HTML
将 HTML 用于网页、电子邮件模板、文档网站以及任何需要在浏览器中显示的内容。
技术细节
HTML 使用由开始标签和结束标签定义的元素树(DOM)。浏览器将 HTML 解析为文档对象模型,应用 CSS 进行样式设计,并执行 JavaScript 实现交互功能。
历史
Tim Berners-Lee 于 1991 年在 CERN 创建了 HTML 作为万维网项目的一部分。W3C 和 WHATWG 将其从 HTML 2.0 (1995) 经 XHTML 发展到当前的 HTML Living Standard (HTML5+)。
从 .HTML 转换
转换为 .HTML
相关格式
相关术语
Learn More
CSS Units Explained: px, em, rem, vh, and When to Use Each
CSS offers over a dozen length units, each suited to different situations. Understanding the differences between absolute and relative units …
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
Meta Tags for SEO: Title, Description, and Open Graph
Meta tags control how your pages appear in search results and social media shares. This guide covers the essential meta …
Text Encoding Explained: UTF-8, ASCII, and Beyond
Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and …
Flexbox vs CSS Grid: A Practical Comparison
Flexbox and CSS Grid are complementary layout systems, not competitors. This guide clarifies when to reach for each one and …
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to …