This is an introductory tutorial on HTML5. In order to allow more beginners to find the right direction, this article is all about how beginners can learn HTML5 systematically.
1. What is an HTML file?
The full English name of TML is Hypertext Marked Language, and the Chinese name is "Hypertext Markup Language".
The difference from ordinary text is that an HTML file not only contains text content, but also contains some Tags, which are called "tags" in Chinese.
The suffix of an HTML file is .htm or .html.
You can write HTML files using a text editor.
2. Write an HTML file
The full English name of TML is Hypertext Marked Language, and the Chinese name is "Hypertext Markup Language".
The difference from ordinary text is that an HTML file not only contains text content, but also contains some Tags, which are called "tags" in Chinese.
The suffix of an HTML file is .htm or .html.
You can write HTML files using a text editor.
<html> <head> <title>PHP中文网</title> </head> <body> This is my first homepage.<b>This text is bold</b> </body> </html>
To view the first.html file, double-click it. Or open the browser, select Open from the File menu, and then select the file.
The first Tag of this file is . This Tag tells your browser that this is the header of the HTML file. The last Tag of the file is , indicating that the HTML file ends here.
The content between
and is Head information. Head information is not displayed and you cannot see it in the browser. But that doesn't mean the information isn't useful. For example, you can add some keywords to the Head information to help search engines search for your web page.The content between
The information between
and is the main text.The text between and is in bold. As the name suggests, it means bold.
HTML files look similar to ordinary text, but they have more tags than ordinary text, such as , , etc. Through these tags, you can tell the browser how to display this file.
HTML Elements
HTML Elements are used to mark text and represent the content of the text. For example, body, p, and title are HTML elements.
HTML elements are represented by Tag, which starts with .
Tag usually appears in pairs, such as
. The starting one is called Opening Tag, and the ending one is called Closing Tag.Currently, HTML Tags are not case-sensitive. For example, and are actually the same.
Attributes of HTML Elements
HTML elements can have attributes. Attributes extend the capabilities of HTML elements.
For example, you can use a bgcolor attribute to make the background color of the page red, like this:
Another example , you can use the border attribute to set a table to a borderless table. As follows:
The above is the detailed content of What is an HTML file? A preliminary understanding of HTML files. For more information, please follow other related articles on the PHP Chinese website!

This article explains how to embed audio in HTML5 using the <audio> element, including best practices for format selection (MP3, Ogg Vorbis), file optimization, and JavaScript control for playback. It emphasizes using multiple audio f

The article discusses using the HTML5 Page Visibility API to detect page visibility, improve user experience, and optimize resource usage. Key aspects include pausing media, reducing CPU load, and managing analytics based on visibility changes.

The article discusses using viewport meta tags to control page scaling on mobile devices, focusing on settings like width and initial-scale for optimal responsiveness and performance.Character count: 159

This article explains how to create and validate HTML5 forms. It details the <form> element, input types (text, email, number, etc.), and attributes (required, pattern, min, max). The advantages of HTML5 forms over older methods, incl

The article discusses managing user location privacy and permissions using the Geolocation API, emphasizing best practices for requesting permissions, ensuring data security, and complying with privacy laws.

This article details creating interactive HTML5 games using JavaScript. It covers game design, HTML structure, CSS styling, JavaScript logic (including event handling and animation), and audio integration. Essential JavaScript libraries (Phaser, Pi

The article explains how to use the HTML5 Drag and Drop API to create interactive user interfaces, detailing steps to make elements draggable, handle key events, and enhance user experience with custom feedback. It also discusses common pitfalls to a

This article explains the HTML5 WebSockets API for real-time, bidirectional client-server communication. It details client-side (JavaScript) and server-side (Python/Flask) implementations, addressing challenges like scalability, state management, an


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1
Powerful PHP integrated development environment
