HTML không đúng quy định
Network administrator.
Today there are many browser technologies, which can run on computers, phones or other small devices. These small devices often lack the resources or the power to translate 'bad' markups.
XHTML is a markup language in which documents must be properly marked, developed by combining the power of both HTML and XML.
Text structure
is required.,,
and
is required.Elements in XHTML
Properties in XHTML
is required
XHTML text must contain XHTML DOCTYPE declaration.
Must have elements ,,
and , xmlns attribute in the tag
must specify xml space for text. The example below shows XHTML text with minimum required tags.
"https://quantrimang.com/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Tiêu đề văn bản
nội dung
XHTML elements must be properly nested
In HTML, some elements can be nested within the same way as the example below.
Văn bản in đậm và in nghiêng
But in XHTML, all elements must be properly nested, as in the example below.
Văn bản in đậm và in nghiêng
XHTML elements must always be closed
Writing as below is wrong
Paragraph 1
Paragraph 2
It must be this:
Paragraph 1
Paragraph 2
Empty elements must also be closed
As the example below is invalid.
Ngắt dòng:
Đường nằm ngang:
Hình ảnh:
Which must write as below.
Ngắt dòng:
Đường nằm ngang:
Hình ảnh:
Elements in XHTML must be written in lowercase
Writing as below is wrong.
Paragraph
Which must write lowercase as below.
Paragraph
Attribute names in XHTML must be written in lowercase
Do not write
but must write
Attribute value must be in quotation marks
Do not write but must write
Do not simplify attributes
False
It's correct
False
It's correct
How to convert from HTML to XHTML
Previous article: Uniform Resource Locators in HTML
The following article: Form in HTML