Preface:
Currently, we pay attention to standard website construction, while the technology used for standard website construction is mainly XHTML + CSS. Currently, HTML code is widely used. How can I convert it? What is the difference between HTML and XHTML? In this tutorial, you will learn the differences between HTML and XHTML and how to convert HTML into XHTML. After all, XHTML is the development direction, so I think it is necessary to publish this tutorial on this site. I feel that if you want to use the standard, it is better to learn HTML first, because it is relatively simple, and then let's take a look at this tutorial.
XHTML introduction:
XHTML is the abbreviation of EXtensible HyperText Markup Language, while HTML is HyperText Markup Language. In fact, the standard should be XML. Why should we learn XHTML? Because the current HTML code is cumbersome and dangerous, but the XML use environment is not mature, so an excessive product launched is XHTML, which plays a leading role. Some people think that XHTML is an upgraded version of HTML, which is actually correct. My understanding is that XHTML makes HTML a more standard markup language and makes HTML powerful, this reduces the hassle of code, especially tables.
In January 26, 2000, XHTML was set as a standard by the international standards organization W3C (World Wide web Consortium). It is regarded as the latest version of HTML and will gradually replace HTML. All browsers now support XHTML, and XHTML is compatible with HTML 4.0. Some people think that XHTML is HTML4.01. If you write a website that complies with the standards during the learning process, you can pass W3C verification. After the verification is passed, you will get a mark, usually XHTML1.0 certification and CSS verification. I do not know how many websites in China have passed these two verifications at the same time. You can renew it!
Why do we use XHTML?
XHTML is an over-product that upgrades HTML to XML and is set as a standard. XHTML is fully compatible with HTML4.01 and has XML syntax. Here is an HTML with the error code, as shown below:
<Html>
<Head>
<Title> This is bad HTML </title>
<Body>
<H1> Bad HTML
</Body>
Although the error code is included, it can still be displayed normally when browsing in the browser. XML is a markup language, but it requires that any element that appears in a webpage be marked. XML is used to describe the data in a webpage, while HTML is used to display the elements in a webpage. Currently, all browser technologies we use to access the Internet, including laptops and mobile phones, must be correctly marked, if an error mark is displayed, the display may be particularly confusing or even unavailable.
Therefore, we have combined HTML and XML with some other technologies. We have gained a useful and useful language-XHTML in the future.
In the future, we will use the correct XHTML format to mark them so that all browsers can correctly execute them. Therefore, it is necessary to start learning XHTML now.
Differences between XHTML and HTML:
XHTML is a new technology. We should be familiar with it before browsers and other software support it. Before learning XHTML, we should familiarize ourselves with HTML4.0. We can download a reference manual to familiarize ourselves with it. This makes it easier to learn XHTML. In other words, we should try our best to write less error code when writing code in HTML. For example, we should use lower-case characters to write HTML, the end of each tag must be added. For example, <p> Welcome to the web site </p>. We must maintain this rule.
This article is from: Web teaching Network