My First Heading

My first paragraph.

```"> tutorialpro.org(tutorialpro.org)

My First Heading

My first paragraph.

```" />
Easy Tutorial
❮ Html5 Syntax Html5 Websocket ❯

HTML Introduction

HTML Example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
</head>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

Example Explanation

Note: Use the F12 key on your keyboard to enable debugging mode in the browser to see the tags.


What is HTML?

HTML is the language used to describe web pages.


HTML Tags

HTML markup tags are often referred to as HTML tags.


HTML Elements

"HTML tags" and "HTML elements" generally mean the same thing.

Strictly speaking, an HTML element includes the start tag and end tag, as shown in the example:

HTML Element:


Web Browsers

Web browsers (like Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as web pages.

Browsers do not display the HTML tags directly but use them to determine how to present the content of the HTML page to the user.


HTML Page Structure

Below is a visual representation of an HTML page structure:

| | Only the <body> region (white part) will be displayed in the browser. | | --- | --- |


HTML Versions

Many versions of HTML have emerged since the inception of the web:

Version Release Date
HTML 1991
HTML+ 1993
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 1.0 2000
HTML5 2012
XHTML5 2013

<!DOCTYPE> Declaration

The <!DOCTYPE> declaration helps browsers display web pages correctly.

There are many different types of documents on the web, and correct declaration of the HTML version ensures that browsers display the content correctly.

The doctype declaration is case-insensitive, and the following methods are acceptable:


Common Declarations

HTML5

HTML 4.01

XHTML 1.0

See the full list of document types in the DOCTYPE Reference.


Chinese Encoding

Currently, most browsers will display Chinese characters incorrectly without proper encoding. Therefore, it is necessary to declare the character set as UTF-8 or GBK in the head.

HTML Example

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>
❮ Html5 Syntax Html5 Websocket ❯