Make writing a habit together! This is my first day to participate in the “Gold Digging Day New Plan · April More text challenge”, click to see the details of the activity.
HTML Basics Tutorial 1 – Introduction to HTML
What is HTML
HTML is a Language used to describe web pages. Unlike other programming languages, HTML belongs to Hyper Text Markup Language.
HTML is not a programming language, it is a markup language !!!!
HTNL is a set of markup languages that use tag tags to describe pages, and HTML documents are what we call Web pages. It includes a series of tags. These tags unify the format of documents on the network and connect scattered Internet resources into a logical whole.
HTML tags
HTML tags are keywords surrounded by Angle brackets, such as < HTML >,, and so on, and usually HTNL tags come in pairs, such as content , where the first tag is the start tag and the second tag is the end tag.
HTML Page structure
<html>
<head>
<title>Page Title /title></head>
<body>
<h1>This is a headline</h1>
<p>This is a paragraph</p>
</body>
</html>
Copy the code
Only elements in the body tag are displayed in the browser.
<! DOCTYPE > declaration
Solve the problem of Chinese garbled characters in the browser
Add
to tag
HTML compiler
HTML files can be written directly in Notepad, but this is not efficient, so we usually use a more convenient compiler, such as VS Code, Hbuilder or the more powerful WebStorm, etc.
Click download Hbuilder — select APP development board
Open new project and select normal project (project name cannot be empty!!) , the template selects the basic HTML project.
The img folder is usually used for storing CSS files. The IMG folder is usually used for storing images, videos and audio files. The JS folder is usually used for storing javascript files. The rest, such as ICONS, can be directly stored in the root directory of the project. If there are other HTML files, you can also open a new HTML folder to store THE HTML files. The index.html in the root directory is the home page (it is recommended that the name of the home page be index.html) for easy identification by the server.
Files of different functions are divided into folders, and codes of different functions are divided into files, which is convenient for subsequent project management and maintenance (we strongly recommend that you keep the habit of folders divided into files!).
Click into index.html, you can see the basic framework of HTML file and declare HTML version and prevent Chinese garble have been created for us, more convenient than using Notepad directly.
After compiling, click on the top to run, select the browser to view the page effect, or directly click in the project directory to open the index.html file.
I recommend you to use Chrome for easy debugging, etc. (my opinion only)