HTML(HyperText Markup Language)是构建网页的基础语言。本教程将为您介绍 HTML 的基本概念和常用标签。
基本结构
一个简单的 HTML 页面通常包含以下结构:
<!DOCTYPE html>
:声明文档类型<html>
:HTML 文档的根元素<head>
:包含文档的元信息<body>
:包含文档的可见内容
标签
HTML 使用标签来定义文档的结构。以下是一些常用的 HTML 标签:
<h1>
到<h6>
:标题标签<p>
:段落标签<a>
:超链接标签<img>
:图像标签<div>
:容器标签
实例
以下是一个简单的 HTML 页面实例:
<!DOCTYPE html>
<html>
<head>
<title>我的网页</title>
</head>
<body>
<h1>欢迎来到我的网页</h1>
<p>这是一个段落。</p>
<a href="/web_basic/css_tutorial">学习 CSS</a>
<img src="https://cloud-image.ullrai.com/q/web_basic_html_tutorial/" alt="HTML 教程"/>
</body>
</html>
扩展阅读
更多关于 HTML 的内容,请访问我们的 HTML 教程 页面。
# HTML Tutorial
HTML (HyperText Markup Language) is the fundamental language for building web pages. This tutorial will introduce you to the basic concepts and common tags of HTML.
## Basic Structure
A simple HTML page typically includes the following structure:
- `<!DOCTYPE html>`: Declares the document type
- `<html>`: The root element of an HTML document
- `<head>`: Contains metadata about the document
- `<body>`: Contains the visible content of the document
## Tags
HTML uses tags to define the structure of a document. Here are some commonly used HTML tags:
- `<h1>` to `<h6>`: Heading tags
- `<p>`: Paragraph tag
- `<a>`: Hyperlink tag
- `<img>`: Image tag
- `<div>`: Container tag
## Example
Here is an example of a simple HTML page:
```html
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is a paragraph.</p>
<a href="/web_basic/css_tutorial">Learn CSS</a>
<img src="https://cloud-image.ullrai.com/q/web_basic_html_tutorial/" alt="HTML Tutorial"/>
</body>
</html>
Further Reading
For more information about HTML, please visit our HTML Tutorial page.