Home>Article>Web Front-end> What is HTML
HTML is a declaration that is used to specify which HTML version the web browser uses to write the page, that is, an instruction that instructs the web browser about the information about the HTML page.
In HTML documents, we can often see that there is a tag! DOCTYPE>, thenWhat is it? What does it do? The following article will introduce to you what HTML is? Hope this helps.
HTML What is it? What is the use?
is a statement that is used to specify which HTML version the web browser uses to write the page. It is an instruction that instructs the web browser about the information about the HTML page.
Note:is not an HTML tag, it has no closing tag >, and is not case-sensitive; it must appear on the first line of the HTML document, before the tag.
Declared type
In fact, there are many types of HTML, such as HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1, etc.
Let’s take a look at how the declaration of HTML 4.01, HTML5 and XHTML is written:
HTML 4.01 Declaration
There are 3 possible document types in HTML 4.01, namely: HTML 4.01 Strict, HTML 4.01 Transitional and HTML 4.01 Frameset. When we want to create an HTML 4.01 type document, declarations need to have one of these three DTDs.
Note: In HTML 4.01, the declaration needs to reference the DTD, because HTML 4.01 is based on SGML. The DTD stipulates the rules of the markup language so that the browser can correctly identify the content.
HTML 4.01 Strict
HTML 4.01 Transitional
;
HTML 4.01 Frameset
XHTML declaration
XHTML declaration can be divided into XHTML 1.0 declaration and XHTML 1.1 declaration. There are 3 possible document types in XHTML 1.0 : XHTML 1.0 Strict, XHTML 1.0 Transitional and XHTML 1.0 Frameset. Let's take a look at how to write XHTML's declaration:
XHTML 1.0 Strict
XHTML 1.0 Transitional
XHTML 1.0 Frameset
XHTML 1.1
HTML 5 Statement
There is only one declaration in HTML5, and because HTML 5 is not based on SGML, there is no need to reference the DTD. So the declaration for HTML 5 is as follows:
<!DOCTYPE html>
Description:It is always a good practice to add declarations to HTML documents to enable web browsers to recognize the type of document expected.
Browser compatibility
# states that it is compatible with all browsers.Summary:The above is the entire content of this article, I hope it will be helpful to everyone's study.
The above is the detailed content of What is HTML. For more information, please follow other related articles on the PHP Chinese website!