<br />This site’s original content, please indicate the source 123WORDPRESS.COM when reprinting. Preface: Nowadays, we all pay attention to standard website building, and the technologies used in standard website building are mainly XHTML CSS. Now we generally use HTML code, so how can I convert it? And what is the difference between HTML and XHTML? In this tutorial, you will learn the difference between HTML and XHTML, and how to convert HTML to XHTML. After all, XHTML is the direction of development, so I think it is necessary to publish this tutorial on this site. I feel that if you want to use standards it is better to learn HTML first, because it is easier, and then look at this tutorial. XHTML Introduction: XHTML is the abbreviation of EXtensible HyperText Markup Language, while HTML is HyperText Markup Language. This is the difference in name. In fact, the standard we are talking about should be XML, so why should we learn XHTML? Because the current HTML code is cumbersome and full of dangers, but the XML usage environment is still immature, an intermediate product, XHTML, was launched, which plays a role in both ends. Some people think that XHTML is an upgraded version of HTML, which is actually correct. My understanding is that XHTML makes HTML a more standardized markup language, making HTML more powerful and reducing the cumbersomeness of the code, especially tables. XHTML was defined as a standard by the international standards organization W3C (World Wide Web Consortium) on January 26, 2000. It is considered to be the latest version of HTML and will gradually replace HTML. All browsers now support XHTML, which is compatible with HTML 4.0. Some people also think that XHTML is HTML4.01. If you write a standard-compliant site yourself during the learning process, you can pass the W3C validation, and you will get a logo after the validation, usually XHTML1.0 certification and CSS validation. I am not sure how many websites in China have passed both verifications. You can go to http://www.w3.org/ to verify your website. If it meets the two rules, we will give us two pieces of code to add to your web page to show others that you have used standard website building. That's awesome! Why We Use XHTML XHTML is a transitional product from HTML to XML and is defined as a standard. XHTML is fully compatible with HTML 4.01 and has XML syntax. Let's take a look at an HTML file containing an error code, as follows: <html> <head> <title>This is bad HTML</title> <body> <h1>Bad HTML </body> Although it contains error codes, it can still be displayed normally when we browse it in the browser. XML is a markup language, but it requires that any element appearing in a web page should be marked. XML is used to describe the data in a web page, while HTML is used to display the elements in a web page. The various browser technologies we currently use to browse the Internet, including laptops, mobile phones, etc., all require that some of the content being browsed must be correctly marked. If there are incorrect marks, the display may be extremely confusing or even not display properly. So combining HTML and XML, along with a few other technologies, we get a language that is useful now and will be useful in the future - XHTML. When everything is standardized in the future, we will have to use XHTML correctly formatted tags so that all browsers can execute them correctly, so it is necessary for us to start learning XHTML now. Difference between XHTML and HTML: XHTML is a new technology. Before browsers and other software support it, we should be familiar with it. In order to better learn XHTML, we should be familiar with HTML4.0 before we can download a reference manual to familiarize ourselves with it. In order to make it easier for us to learn XHTML, in other words, we should try our best to write less wrong codes when writing HTML codes, such as: use lowercase characters to write HTML, and add the end of the tag after each tag, such as: <p>123WORDPRESS.COM Welcome you</p> The end must be there, we must maintain this rule. Previous Page 1 2 3 4 5 6 Next Page Read More |
<<: JavaScript anti-shake and throttling detailed explanation
>>: 404 error occurs when accessing the homepage of tomcat started in Docker mode
Query the current date SELECT CURRENT_DATE(); SEL...
This tutorial shares the installation tutorial of...
This article introduces how to solve the problem ...
Dynamic rem 1. First, let’s introduce the current...
This article example shares the specific code of ...
This article shares the specific code of JavaScri...
Table of contents Basic application of javascript...
Export database data: First open cmd and enter th...
Table of contents JSON.parse JSON.parse Syntax re...
Unable to load dynamic library under Linux When t...
Table of contents 1. Introduction to gojs 2. Gojs...
1. Preparation before installation: 1.1 Install J...
Table of contents Initialization of echart app-ba...
Keywords General The title cannot contain words l...
background Before we know it, a busy year is comi...