summaryrefslogtreecommitdiff
path: root/Document structure.md
diff options
context:
space:
mode:
Diffstat (limited to 'Document structure.md')
-rw-r--r--Document structure.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/Document structure.md b/Document structure.md
new file mode 100644
index 0000000..2674493
--- /dev/null
+++ b/Document structure.md
@@ -0,0 +1,30 @@
+---
+tags:
+ - html
+ - web
+---
+This describes [[HTML]] document structure.
+
+**Mandatory**
+```
+<!DOCTYPE html>
+<html>
+<head lang="nl">
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width" />
+ <title></title>
+</head>
+<body>
+</body>
+</html>
+```
+
+[lang attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang#language_tag_syntax) region is option (e.g nl-NL), we can just say nl. The lang attribute can be used on any part that contains text, to denote a different locale from the main one.
+
+**Charset must come before title** and it makes sure the browser can render text correctly.
+
+The **head** element is the place to load [[CSS]] it contains:
+- [[Link elements]]
+- [[Script elements]]
+- [[Base elements]]
+- [[Meta elements]] \ No newline at end of file