DOCTYPE tag in HTML
- 24-07-2022
- Trung Minh
- 0 Comments
The <!DOCTYPE> declaration tells the web browser what version of HTML the page is written in. <!DOCTYPE> is not actually an HTM . tag
The <!DOCTYPE> declaration must be placed first in the HTML document, before the html tag.
How to use the <!DOCTYPE> . declaration
For example , use the <!DOCTYPE> declaration to tell the browser this is an HTML page.
<!DOCTYPE html> <html> <head> <title>Học lập trình miễn phí tại web888.vn</title> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại web888.vn</h1> </body> </html>
Some common <!DOCTYPE> declarations
- HTML 5
- <!DOCTYPE html>
- HTML 4.01 Strict
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">.
- XHTML 1.1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">.