MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

HTML basic display Hello World with tags

Source: Shangpin China | Type: website encyclopedia | Time: December 10, 2015
PHP in Website construction The server side accepts the user's request, and then returns the required results according to the user's request. To process user requests, PHP needs to know what the user has requested.

WWW provides network services to users based on HTML language and HTTP protocol. When people use the browser to access the website server, the communication between the browser and the server is like people to people chat. HTML is the content of chat, and HTTP protocol is the way of voice transmission. To make a metaphor, suppose that all the people on earth speak HTML language, one day. The Star Wars broke out and Mars was under attack. A Martian came to the Earth to ask for help. He spoke to the Earthman with his mouth open for a long time, but the Earthman did not understand what he was saying. Until the Earthman taught the Martians to speak HTML, the Earth knew that the Martians needed help. It can be seen that to let the PHP on the server side know what the user on the client side has requested, the first thing to learn is how the browser speaks in HTML and what it says.

1、 Basic format of HTML document

Open the Windows Notepad and enter the code 1-1.

 An HTML webpage hellworld.htm
Select the File | Save As menu command to display the dialog box, remove the default "*. txt" in the File Name text box, enter the file name "helloworld. htm", select the save location "Desktop", and click the Save button, as shown in Figure 1.2.
 Notepad "Save As"

The helloworld.htm file is an HTML document. The difference between the content of the file and the ordinary text document is:

The HTML document file name ends with ". html" or ". htm".

The content of an HTML document contains tags "<" and ">", which appear in pairs. For example, in the helloworld.htm document, the first tag is<html>, which tells the browser that this is the beginning of the HTML document. The last tag of an HTML document is</html>, which tells the browser that this is the end of the HTML document. The text between the<head>and</head>tags is header information. Header information is not displayed in the browser. The text between the<title>and</title>tags is the document title, which is displayed in the title bar of the browser window. The text between the<body>and</body>tags is the body and will be displayed in the browser.

2、 Show Hello World with labels

You saved "helloworld.htm" on your desktop in the previous step. If it has been deleted, you can save it again by pressing the method in the first step. Double click the "helloworld.htm" file, or start the browser, and select the File | Open menu command to display the Open dialog box. Click the Browse button to display the browse dialog box. Select "Desktop" as the open location, and select "Open" in the list box Helloworld.htm "file, click the" Open "button, and the" Open "text box in the open dialog box displays the path of helloworld.htm, as shown in Figure 1.3.
 Open helloworld.htm file with browser

Finally, click OK, and the browser displays Hello World.

Comparing the code and the display results, we can see that all the tags included by the "<" and ">" symbols are not displayed in the browser, the "Page Title" in the<title>and</title>tags is displayed in the browser title bar, and the "Hello World" between<body>and</body>is displayed in the browser content bar.
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]