A website is actually made up of web pages. If you want to understand what a website is, you must first understand what a web page is?
(1) A webpage is actually a file on the server. When we browse the webpage, this file will be downloaded to our local computer, and then parsed by the browser to render various beautiful interfaces, such as tables, pictures, and titles. , list, etc.
(2) There are many kinds of suffixes for web page files, such as .html, .php, .jsp, .asp, etc. I believe everyone has seen them in the browser address.
(3) But no matter what the suffix of the web page is, its essence is the same, which is a plain text file composed of HTML code.
(4) We can use Notepad, Notepad++, Sublime Text, etc. to write code.
(1) A website can be thought of as a folder placed on the server, which contains many web pages and many subfolders.
(2) When a user accesses a website, he or she reads the contents of a file. When a user shares data, he or she modifies the contents of a file, deletes an existing file, or creates a new file.
The most commonly used writing software nowadays is Visual Studio Code, and future codes will also be written in Visual Studio Code.
HTML is a language used to describe web pages. HTML is a common markup language used on the Web. HTML allows you to format text, add images, create links, input forms, frames and tables, etc., and save it as a text file, which the browser can read and display.
(1) HTML refers to HyperText Markup Language: HyperText Markup Language
(2) HTML is not a programming language, but a markup language
(3) Markup language is a set of markup tags
(4) HTML uses markup tags to describe web pages
(5) HTML documents contain HTML tags and text content
(6) HTML documents are also called web pages
(1) HTML markup tags are often called HTML tags
(2) HTML tags are keywords <tag> surrounded by angle brackets
(3) HTML tags usually appear in pairs <tag>content</tag>
(4) The first tag in the tag pair is the start tag, and the second tag is the end tag.
(5) Start and end tags are also called open tags and closing tags
(1) HTML tags and HTML elements usually describe the same meaning
(2) But strictly speaking, an HTML element contains a start tag and an end tag
(1) Web browsers (such as Google Chrome, Internet Explorer, Firefox and Safari) are used to read HTML files and display them as web pages.
(2) Web browsers do not directly display HTML tags, but use tags to determine how to display the content of the HTML page to users.
Next, let’s learn about the structure of HTML through a simple HTML example.
Note: After entering Visual Studio Code , change the suffix of the new file to .HTML, enter ! and press Enter to create the basic framework.
HTML example is as follows:
<!DOCTYPEhtml><html><head><metacharset=UTF-8><metaname=viewportcontent=width=device-width,initial-scale=1.0><title>Document</title></head><body>< /body></html>
Example analysis:
● DOCTYPE is a document type declaration of standard universal markup language, which helps to display web pages correctly in browsers. The doctype declaration is not case-sensitive.
●The <html> tag is the root element of the HTML page, and the end tag of this tag is </html>
●The <head> tag contains the metadata of the document
●<meta charset=utf-8> defines the web page encoding format as utf-8, which can solve the problem of Chinese garbled characters in the browser.
●The <title> tag defines the title of the document
●The <body> tag defines the main body of the document, that is, the page content visible on the web page. The end mark of this tag is </body>