Composition structure of HTML basic HTML

Time:2021-9-28

What is an HTML file?
HTML represents hyper text markup language.
An HTML file is a text file that contains tags.
These tags show how the speed keeping browser displays this page.
HTML files must have an HTM or HTML extension.
HTML files can be created with a simple text editor.

First, let’s briefly introduce HTML language (what we instill here is practical operation). Html is the general language of the network, a simple and general full set markup language. It allows web producers to create complex pages of text and pictures that can be viewed by anyone else on the Internet, no matter what type of computer or browser they use. Is it amazing? It’s not magical at all, because now you see pages written in this language.

Yes, html is not very magical, just because you don’t know it very well. Now let’s begin to open her veil and first introduce the composition and structure of HTML:

Composition structure of HTML
(head, eyes, body – like a person, isn’t it?)

1. Head. As long as you have learned English, you should know how to write your head in English! Yes, head is; Therefore, the HTML writing method of the header is < head > the content of the header < / head >, which is not simple. Please note that the two are very similar, but the latter one has more “/” symbols than the previous one. Such will be often used in the future.

2. Eyes. Just like people’s eyes, it is the window of the soul, and the eyes of a web page should be the title of its page. How to say the title? title,yes! We all know that eyes grow on the head, so: < title > Title < / Title > these should be placed between < head > and < / head >. that is
< head > < title > Title < / Title > < / head >

3. Body. The body is the most important part of the web page, because what we mentioned above is not displayed on the page, and the page you see is his body part (of course, its title can be seen in the top left corner of the browser). The body, his writing method is: < body > page content</body>
Finally, don’t forget to integrate these parts into a web page, so let’s wrap them up with < HTML > < / HTML >.
Well, let’s take a general look at the structure of the web page:

Copy code

The code is as follows:

<html>
<head>
<title>
title
</title>
</head>
<body>
Page content
</body>
</html>

Do you want to try?
If you are running Windows, open notepad and enter the following text:


Tip: you can modify some code before running

Save this file as “mypage. HTM”.
Double click the file directly; Or start the browser – > select “open” (or “open page”) in the file menu, and a dialog box will appear – > select “Browse” (or “select file”) – > locate the HTML file you just created – “mypage. HTM”, select it, and click “open” ->. Then in the dialog box, you will see the address of the file, such as: “C: \ mydocuments \ mypage. HTM” – > click OK and the browser will display this page.

About html editor:
With some WYSIWYG editors, such as frontpage and dreamwaver, you can easily create a page without writing code in plain text.
But if you want to be a skilled web developer, we strongly recommend that you write code with a plain text editor, which will help you learn the basics of HTML.

common problem
Q: I have finished compiling HTML files, but I can’t see the results in the browser. Why?
A: please make sure you save the file and use the correct file name and extension, such as “C: \ mypage. HTM”, and make sure you use the same file name when you open it with your browser.
Q: I edited the HTML file, but the modification results are not displayed in the browser. Why?
A: the browser caches your page, so it doesn’t need to read the same page twice. You modified this page and the browser doesn’t know. Use the refresh / reload button to force the browser to read the edited page.

Recommended Today

Swift advanced 08: closure & capture principle

closure closurecanCapture and storageOf any constants and variables defined in their contextquote, this is the so-calledClose and wrap those constants and variablesTherefore, it is called“closure”Swift can handle everything for youCaptured memory managementOperation of. Three forms of closure [global function is a special closure]: a global function is a closure that has a name but does […]