Home > Web Front-end > HTML Tutorial > Detailed introduction to the basic concepts of HTML

Detailed introduction to the basic concepts of HTML

php中世界最好的语言
Release: 2018-01-22 10:45:09
Original
2201 people have browsed it

This time I will bring you the basic concepts of HTMLdetailed introduction, what are the notes of the basic concepts of HTML, the following is a practical case, let’s take a look.

What is HTML?

HTML is a language used to describe web pages.

•HTML refers to Hyper Text Markup Language
•HTML is not a programming language, but a markup language
•Markup language is a set of markup tags
•HTML uses markup tags to describe web pages

HTML tag

HTML markup tag is usually called HTML tag (HTML tag ).

•HTML tags are keywords surrounded by angle brackets, such as
•HTML tags usually appear in pairs, such as and
•The first tag in the tag pair is the opening tag and the second tag is the closing tag
•The opening and closing tags are also known as opening tags and closing tags

HTML elements

## The #HTML element refers to all code from the start tag to the end tag.

Note: The start tag is often called an opening tag, and the end tag is often called a closing tag.

HTML element syntax

•HTML elements start with a start tag

•HTML elements end with an end tag
•The content of the element is the content between the start tag and the end tag
•Some HTML elements have empty content
•Empty elements are closed in the opening tag (end with the end of the opening tag)
•Most HTML elements can have the
attribute

HTML Attributes

HTML tags can have attributes. Attributes provide more information about HTML elements.

Attributes always appear in the form of name/value pairs, such as: name="value".

Attributes are always specified in the opening tag of an HTML element.

Attribute example 1:

<h1> 定义标题的开始。
<h1 align="center"> 拥有关于对齐方式的附加信息。
Copy after login

TIY: Centered title

Attribute example 2:

<body> 定义 HTML 文档的主体。
<body bgcolor="yellow"> 拥有关于背景颜色的附加信息。
Copy after login

TIY: Background color

Attribute Example 3:

<table> 定义 HTML 表格。(您将在稍后的章节学习到更多有关 HTML 表格的内容)
<table border="1"> 拥有关于表格边框的附加信息。
Copy after login

HTML document = web page


•HTML 文档描述网页
•HTML 文档包含 HTML 标签和纯文本
•HTML 文档也被称为网页
Copy after login

The role of the Web browser is to read HTML documents and display them in the form of web pages. Browsers do not display HTML tags, but use tags to interpret the content of the page.

<html><body><h1>My First Heading</h1><p>My first paragraph.</p></body>
</html>
Copy after login

Example explanation

•<html> 与 </html> 之间的文本描述网页
•<body> 与 </body> 之间的文本是可见的页面内容
•<h1> 与 </h1> 之间的文本被显示为标题
•<p> 与 </p> 之间的文本被显示为段落
Copy after login

•When you save an HTML file, you can use either the .htm or the .html file suffix. We use .htm in our examples. This is just a long-standing habit, because many software in the past only allowed three-letter file suffixes. But for new software, there is no problem using .html.

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

Detailed examples of HTML text formatting

Special characters of html-css3 content: "Special How to use the symbol "

h5How to implement input box prompt + normal text box prompt

The above is the detailed content of Detailed introduction to the basic concepts of HTML. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template