Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to make a simple web page with XHTML

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to make a simple web page by XHTML". The editor shows you the operation process through an actual case. The operation method is simple and fast, and it is practical. I hope this article "how to make a simple web page in XHTML" can help you solve the problem.

Make your first web page in one minute:

Let's try to make a simple web page. I hope you can follow us. It will only take you a minute. Now you may not know what those angle brackets "" and the letters inside are, don't worry, we will introduce them to you in a later tutorial.

First, run notepad, or create a new text document anywhere, and enter the following in notepad:

The following is the referenced content:

I am the title of this page.

This is my first web page.

Save the file after input and name it "index.html". (click File-> Save as. Fill in "index.html" in the "File name" column, select "all Files" in the "Save as type" column, and then click "Save button")

After saving, double-click the file, and the browser will automatically open the page. Please make sure that your page is the same as this page, and if so, then you have successfully completed your first relatively humble page.

Note that this is a simple page, although it conforms to the XHTML standard in syntax, but it still lacks some content if it is to be a complete W3C-compliant XHTML page. The relevant content will be introduced in later tutorials. This page is only used to explain some basic XHTML knowledge.

Basic knowledge explanation

The web page we just made begins and ends, and they represent the beginning and end of the web file, respectively.

In English, head means head and body means body. The and two parts of the web page represent the "head" and "body" of the web page respectively. You may have noticed that there is one in the "head" of our web page. The word title means the title, and the title of the page will be displayed in the title bar at the top of the browser. The body of the page, that is, the content in the middle of the tag, will be displayed in the browser as the body.

This page is so thin that there is nothing in head or body. We will gradually enrich the content of the web page in future tutorials. But now please remember a concept: the head of the page is written for the browser, it will not be displayed on the page, while the body is written for the users of the site, it is what the browser will display.

Open the following two error examples. There are serious errors in their code, but the browser will display the two pages accurately.

Example 1 Murray-the body grows in the head

I am the title of this page.

This is my first web page.

Take a look at the above page, the content between and is displayed normally on the page. But it was a funny mistake. I put my body in my head.

Example 2-the head grows under the neck

I am the title of this page.

This is my first web page.

The adaptability of the browser is so impressive that it can recognize it even if you put your head in your body. Look at the title bar, the title is completely normal.

This is the end of the content about "how to make a simple web page with XHTML". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report