summaryrefslogtreecommitdiff
path: root/Document structure.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-05-06 23:09:23 +0200
committerJasper Ras <jras@hostnet.nl>2025-05-06 23:09:23 +0200
commit78211f96953bc1a63570f2430cee4ad92c841ce4 (patch)
tree614db0456636442c7ef250f106f9f8b1d04e01e6 /Document structure.md
parentbb5c734d7445097e94c4a602f5ce066a836dbead (diff)
vault backup: 2025-05-06 23:09:23
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