Template.html: Difference between revisions
(New page: A simple page, with character encoding. <source lang="html"> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/T...) |
No edit summary |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Simple == | |||
<source lang=" | Template for a modern HTML5 page. | ||
<!DOCTYPE html | <source lang="html4strict"> | ||
<!DOCTYPE html> | |||
<html xmlns="http://www.w3.org/1999/xhtml" | <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> | ||
<head> | <head> | ||
<title>Untitled</title> | <meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | |||
<title>Untitled</title> | |||
<link rel="stylesheet" href="style.css" /> | |||
</head> | </head> | ||
<body> | <body> | ||
<p>Hello world</p> | <p>Hello world!</p> | ||
</body> | </body> | ||
</html> | |||
</source> | </source> | ||
The DOCTYPE is important to specify. When it's missing, many browsers (Internet Explorer in particular) will format the using "quirks mode" -- or using exceptions to modern CSS rules to support the historical (and deprecated) behavior of web browsers. | |||
Latest revision as of 11:52, 15 December 2020
Simple
Template for a modern HTML5 page.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Untitled</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<p>Hello world!</p>
</body>
</html>
The DOCTYPE is important to specify. When it's missing, many browsers (Internet Explorer in particular) will format the using "quirks mode" -- or using exceptions to modern CSS rules to support the historical (and deprecated) behavior of web browsers.