XHTML Tutorial - basic knowledge
Examples of this section through the website about understanding how to preserve documents, as well as the working methods of HTML
One minute production with its first page:
Below we try to do a simple website, we hope you will follow the operation, it will only cost you one minute time. Now you may not know that the angle brackets, "<>" and the letter inside is what is more, not to worry, we will be behind the tutorial to introduce you.
Call first run Notepad, or any position in a new text, in the notebook, input the following:
I <html> <head> <title> this page is the title of </ title> </ head> <body> <p> This is my first website. </ P> </ body> </ html>
Input will be finished document preservation, named "index.html." In the " Save as type " column select " all documents ", and then click the " Save button ") (Click on "paper" -> "Save As." In the "file name" fill in the column "index.html" in the "Save as type" box choose "all documents", and then click the "Save button")
After saving, double-click the file, the browser will automatically open this page has. Please check your web page and the page is the same as if the same, then you have successfully completed its first page a relatively simple.
Please note that this is only a simple pages, although it with the grammatical XHTML standards, but if we as a complete, consistent with the W3C standards of XHTML pages, it also lack some of the elements. Relevant content will be introduced after the tutorial. This page is only used to explain some basic knowledge of XHTML.
On the basis of knowledge
We have just produced website <html> beginning to </ html> at the end of their page document on behalf of the beginning and the end.
English is the first head of the meaning of the physical body is meaningless. Website <head> </ head> and <body> </ body> 2 on the part of the website on behalf of the "head" and "body." Perhaps you took note of, our website. "First" inside "There is a <title> </ title>. Title is the title of the meaning of the word, the title page (title) will be displayed in the top of the browser title bar. While website body, which is <body> and </ body> tag among the contents of the text will be displayed in a browser.
This page is very flimsy, head and body are not what. We will gradually after the tutorial rich web content. But now you remember a concept: Web's head (head) is a browser written, it will not be shown on the page, and your body (body) is a Web site to write, is a Web browser will be displayed content.
Practical Jokes XHTML examples of mistakes
Below this open look at the examples of two mistakes. Their code exists a very serious error, but the accuracy of the browser, it will show these two websites.
Example 1 - long in the body, brain
I <html> <head> <title> this page is the title of </ title> <p> This is my first website. </ P> </ head> <body> </ body> </ html>
See above this page, and <head> </ head> content between the normal display on the page. But it is ridiculous mistakes on the body, the brain.
Example 2 - in the brains of the neck
<html> <head> </ Head> <body> <title> I is the title of this page </ title> <p> This is my first website. </ P> </ body> </ html>
The ability to adapt to the browser is really admire, even if you head on the body, it also recognized out. Look at the title bar, title completely normal show.
Well, in the practical application of the above please do not commit such low-level errors. This will have serious consequences: Indexed by search engines may not be your site to use mobile phones or other mobile devices to the Web site you may encounter unknown error friends. Below quickly let us enter the core of the bar XHTML.
Enter the next section: XHTML Tutorial - labels
