After learning about web development and understanding the relationship between HTML, XHTML, XML, CSS, JS, and other technologies, we will have a wider perspective (publish by sunwei)

Source: Internet
Author: User

After so long web development, I don't know the difference between XHTML and HTML?

Yes, but isn't it doing well? But after reading the following, you may feel happy:

First, we will introduce the following:

 

HTML: (Hypertext Markup Language)

HTML can only display text and images on your computer at the beginning. Later, the author wanted to see others' texts and images in his own text, so the text was called hypertext, in addition, if you click a link to connect the text to the other party, this is the meaning of the mark.

The latest html version is 4.0.

 

XML: (Extensible Markup Language)

Its appearance is to make up for the shortcomings of HTML, because HTML is used for a set of tags, such as <A> <font>, and so on. There is no way to define your own tag.

XML is very free. If you want to define a tag, you can define a tag, for example, I can define <sunwei id = '000000********* '> <sex> boy </sex> </sunwei> as a result,

Make XMLProgramming LanguageThe conversion and description of network data when the web system communicates with each other.

 

XHTML: (Extensible Hypertext Markup Language)

Obviously, this is more advanced than HTML. With the XML feature, XHTML was born to make HTML too much to XML, Because XML can completely replace HTML, but it is not time yet, in this way, XHTML is generated, and XHTML is accompanied by the birth of CSS.

Where is XHTML better than HTML?

1. The DTD must be declared at the beginning of the XHTML file.
2. You need to add a namespace for your <HTML> tag.

3. All attributes of tags and tags must be in lower case, and the attribute values can be in upper case.
4. attribute values must be enclosed in quotation marks. Double quotation marks.
5. All labels must be closed, and empty labels are no exception. To disable an empty tag, follow these steps:
<Br/> in HTML <br/>. Note that a space "" And a backslash "/" are added to the backend.

6. If you are using strict. DTD. That is, the strictest XHTML, so many attributes defining the appearance will not be allowed.
For example, you want to remove the border when adding a link to an image. You cannot use , but must passCSS.

7. Alt text should be provided for each image.

 

The above three components constitute the structure in the web standards recommended by W3C organizations ).

 

 

The W3C Web standard consists of three parts: structure, presentation, and behavior)

It is divided into three partsSeparation of performance and content 

We should be able to guess that CSS is a performance technology. Javascript is the behavior technology ., I believe that all users are currently using XHTML + CSS + Js.

In addition, JS works with DOM technology to operate XHTML and CSS ..

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.