HTML (超文本标记语言) 是最基本的 Web 构建块。它定义 Web 内容的含义和结构。HTML 外的其它技术,通常用于描述 Web 页面的外观/呈现 ( CSS ) 或功能/行为 ( JavaScript ).
"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.
HTML uses "markup" to annotate text, images, and other content for display in a Web browser. HTML markup includes special "elements" such as
<head>
,
<title>
,
<body>
,
<header>
,
<footer>
,
<article>
,
<section>
,
<p>
,
<div>
,
<span>
,
<img>
,
<aside>
,
<audio>
,
<canvas>
,
<datalist>
,
<details>
,
<embed>
,
<nav>
,
<output>
,
<progress>
,
<video>
,
<ul>
,
<ol>
,
<li>
and many others.
An HTML element is set off from other text in a document by "tags", which consist of the element name surrounded by "
<
" and "
>
". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the
<title>
tag can be written as
<Title>
,
<TITLE>
, or in any other way.
The articles below can help you learn more about HTML.
If you're new to Web development, be sure to read our HTML 基础 article to learn what HTML is and how to use it.
For articles about how to use HTML, as well as tutorials and complete examples, check out our HTML 学习区域 .
In our extensive HTML 参考 section, you'll find the details about every element and attribute in HTML.
我们已整合包括您努力实现目标所需的所有必要信息的课程。
我们的 HTML 学习区域 features multiple modules that teach HTML from the ground up — no previous knowledge required.
This module sets the stage, getting you used to important concepts and syntax such as looking at applying HTML to text, how to create hyperlinks, and how to use HTML to structure a web page.
This module explores how to use HTML to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.
Representing tabular data on a webpage in an understandable, accessible way can be a challenge. This module covers basic table markup, along with more complex features such as implementing captions and summaries.
Forms are a very important part of the Web — these provide much of the functionality you need for interacting with websites, e.g. registering and logging in, sending feedback, buying products, and more. This module gets you started with creating the client-side/front-end parts of forms.
Provides links to sections of content explaining how to use HTML to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.
crossorigin
attribute, in combination with an appropriate
CORS
header, allows images defined by the
<img>
element to be loaded from foreign origins and used in a
<canvas>
element as if they were being loaded from the current origin.
<img>
or
<video>
, have a
crossorigin
属性 (
crossOrigin
property), which lets you configure the CORS requests for the element's fetched data.
preload
value of the
<link>
元素的
rel
attribute allows you to write declarative fetch requests in your HTML
<head>
, specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in. This ensures that they are made available earlier and are less likely to block the page's first render, leading to performance improvements. This article provides a basic guide to how
preload
works.
<a>
,
<area>
and
<link>
.
<audio>
and
<video>
elements allow you to play audio and video media natively within your content without the need for external software support.
This article covers most of the ways you use CSS to add color to HTML content, listing what parts of HTML documents can be colored and what CSS properties to use when doing so. Includes examples, links to palette-building tools, and more.
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<bgsound>
<big>
<blink>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<content>
<data>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir>
<div>
<dl>
<dt>
<element>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<image>
<img>
<input>
<ins>
<isindex>
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<listing>
<main>
<map>
<mark>
<marquee>
<menu>
<menuitem>
<meta>
<meter>
<multicol>
<nav>
<nextid>
<nobr>
<noembed>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<picture>
<plaintext>
<pre>
<progress>
<q>
<rb>
<rp>
<rt>
<rtc>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<shadow>
<slot>
<small>
<source>
<spacer>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<template>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
<xmp>
<input>
类型
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">