1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
---
layout: web
title: A Quick Guide to Modern HTML
---
# A Quick Guide to Modern HTML
This guide is a work in progress!
Modern HTML is a remarkably simple and coherent standard.
## Basic HTML
HTML is a *markup language* used for content on the web. It is composed of *tags*, that may be *nested* within each other to form a *document tree*. It is *semantic*: every tag
and many tags indeed hold no purpose other than indicating ...
Every website you visit is composed of HTML, which alongside with styling via CSS... Modern websites are composed of somewhat atrocious amounts of
Web browsers receive HTML documents from a web server or from local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for its appearance.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and other objects such as interactive forms may be embedded into the rendered page. HTML provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes, and other items. HTML elements are delineated by tags, written using angle brackets. Tags such as `<img>` and `<input>` directly introduce content into the page. Other tags such as `<p>` and `</p>` surround and provide information about document text and may include sub-element tags. Browsers do not display the HTML tags but use them to interpret the content of the page.
HTML is composed of *tags*. These tags are enclosed in angle brackets
There are quite a few tags, but not overwhelmingly many. Here they all are.
if your tag is not reserved, you can kinda just write whatever?? i like doing this
There are about XX important tags. Here they all are.
## Style
- [`<b>`](https://developer.mozilla.org/HTML/Element/b) or [`<strong>`](https://developer.mozilla.org/HTML/Element/strong): <b>bold</b> text
- [`<i>`](https://developer.mozilla.org/HTML/Element/i) or [`<em>`](https://developer.mozilla.org/HTML/Element/em): <i>italic</i> text
- [`<s>`](https://developer.mozilla.org/HTML/Element/s): <s>struckthrough</s> text
- [`<u>`](https://developer.mozilla.org/HTML/Element/u): <u>underlined</u> text
- [`<q>`](https://developer.mozilla.org/HTML/Element/q): <q>quoted</q> text
- [`<small>`](https://developer.mozilla.org/HTML/Element/small): <small>small</small> text
- [`<sub>`](https://developer.mozilla.org/HTML/Element/sub): <sub>subtext</sub>
- [`<sup>`](https://developer.mozilla.org/HTML/Element/sup): <sup>supertext</sup>
- [`<code>`](https://developer.mozilla.org/HTML/Element/code): <code>text styled like code</code>
Some emphasis must be put: these tags are **semantic**. They are not for styling! You have a much more expressive form of styling with CSS!
Given the existence of a quote key on most ASCII keyboards, this is not very useful, unless you're a stickler for Unicode quotes.
## Wrappers
These wrappers have no style associated with them, but are *semantically meaningful*. or is that true? they are all `block`, no?
`<html>`
`<body>`
`<div> </div>`
- [`<h1>, <h2>, <h3>, <h4>, <h5>, <h6>`](https://developer.mozilla.org/HTML/Element/h1)
- [`<p>`](https://developer.mozilla.org/HTML/Element/p)
- [`<pre>`](https://developer.mozilla.org/HTML/Element/pre)
- [`<br/>`](https://developer.mozilla.org/HTML/Element/br)
- [`<hr/>`](https://developer.mozilla.org/HTML/Element/hr)
- [`<span>`](https://developer.mozilla.org/HTML/Element/span)
## Content
```css
<a>
```
`<img/>`
`<video>`
`<audio>`
`<track>`
`<canvas>`
`<iframe>`
`<math>`
## Lists
- [`<li value=1>`](https://developer.mozilla.org/HTML/Element/li):
A *list element*. Goes within either `<ul>` or `<ol>`. When within `<ol>`, `value` indicates the list numbering should skip to its value.
- [`<ul>`](https://developer.mozilla.org/HTML/Element/ul):
An *unordered* list. Contains a bunch of `<li>`s. Displayed with bullet points by default.
- [`<ol type="1" start=1 reversed>`](https://developer.mozilla.org/HTML/Element/ol):
An *ordered* list. Contains a bunch of `<li>`s. Displayed as a numbered list by default. `type` indicates the numbering type, and can be one-of `a` (lowercase ASCII), `A` (uppercase ASCII), `i` (lowercase Roman), `I` (uppercase Roman), `1` (Arabic). `start` indicates the number to start from. The presence of `reversed` indicates the list ordering should be reversed.
## Stuff
`<button>`
`<details>`, `<summary>`
`<form>`
`<input/>`
`<label>`
`<map>`, `<area>`
`<meter>`
`<noscript>`
`<textarea>`
`<dialog>`
`<marquee>`
`<select>`, `<datalist>`, `<optgroup>`, `<option>`
## Semantic
Aside from being block elements, they have no styling...
- [`<main>`](https://developer.mozilla.org/HTML/Element/main):
- [`<header>`](https://developer.mozilla.org/HTML/Element/header):
- [`<footer>`](https://developer.mozilla.org/HTML/Element/footer):
- [`<nav>`](https://developer.mozilla.org/HTML/Element/nav):
- [`<section>`](https://developer.mozilla.org/HTML/Element/section):
- [`<aside>`](https://developer.mozilla.org/HTML/Element/aside):
- [`<article>`](https://developer.mozilla.org/HTML/Element/article):
## Metadata
`<head>`
`<meta>`
`<link>`
`<title>`
`<base>`
```css
<style>
</style>
```
```css
<script>
</script>
```
`<template>`, `<slot>`
Okay. That's everything important. 75 tags or so? I dunno. Manageable!
---
## Tables
- [`<table>`](https://developer.mozilla.org/HTML/Element/table):
A table. Structured data.
- [`<thead>`](https://developer.mozilla.org/HTML/Element/thead):
A row of cells acting as a header.
- [`<tbody>`](https://developer.mozilla.org/HTML/Element/tbody):
The cells that compose the body of the table.
- [`<tfoot>`](https://developer.mozilla.org/HTML/Element/tfoot):
A row of cells acting as a footer.
- [`<tr>`](https://developer.mozilla.org/HTML/Element/tr):
A row of cells.
- [`<td colspan=1 rowspan=1 headers="">`](https://developer.mozilla.org/HTML/Element/td):
Data cells. `colspan` and `rowspan` indicate their size in the table. `headers` indicates the ids of the corresponding header cells.
- [`<th scope="" colspan=1 rowspan=1 headers="">`](https://developer.mozilla.org/HTML/Element/th):
Header cells. `colspan` and `rowspan` indicate their size in the table. `headers` indicates the ids of the corresponding header cells. `scope` may be one-of `row`, `col`, `rowgroup`, `colgroup`, and indicates the set of cells the header corresponds to.
- [`<col span=1>`](https://developer.mozilla.org/HTML/Element/col):
A column within a table. Columns span over atop rows.
- [`<colgroup span=1>`](https://developer.mozilla.org/HTML/Element/colgroup):
A group of columns within a table.
- [`<caption>`](https://developer.mozilla.org/HTML/Element/caption):
The title of a table.
The sheer quantity of tags for tables is quite intimidating.
In general, tables are *far* less used than they once were, thanks to improvements in the layout capabilities of CSS.
You can pretty much just ignore them.
## Less Useful Elements
`<fieldset>`, `<legend>`
`<figure>`, `<figcaption>`
`<picture>`, `<source>`
`<output for name>`
- [`<dl>`](https://developer.mozilla.org/HTML/Element/dl):
A *description list*. Consists of terms (`<dt>`) and descriptions (`<dd>`). Ugly as sin, and scarcely used.
- [`<dt>`](https://developer.mozilla.org/HTML/Element/dt):
Specifies a *term* entry in a description list.
- [`<dd>`](https://developer.mozilla.org/HTML/Element/dd):
Specifies a *description* entry in a description list.
- [`<address>`](https://developer.mozilla.org/HTML/Element/address):
An element indicating its contents are contact information.
- [`<blockquote cite="url">`](https://developer.mozilla.org/HTML/Element/blockquote):
An element indicating its contents are an extended quotation.
- [`<data value="data">`](https://developer.mozilla.org/HTML/Element/data):
An element indicating its content has corresponding data, in the `value` attribute.
- [`<search>`](https://developer.mozilla.org/HTML/Element/search):
An element indicating its contents are related to searching.
- [`<time datetime="">`](https://developer.mozilla.org/HTML/Element/time):
An element indicating a specific time. `datetime` must be set to a machine-readable format.
- [`<wbr>`](https://developer.mozilla.org/HTML/Element/wbr):
An element that represents a word break *opportunity*. Browsers will prefer breaking there when possible.
## Deprecation Fodder
These elements are *really* useless. You shouldn't bother knowing them. They're in the spec, but scarcely used.
- [`<abbr>`](https://developer.mozilla.org/HTML/Element/abbr): An element for displaying abbreviations.
- [`<cite>`](https://developer.mozilla.org/HTML/Element/cite): An element indicating its contents are a citation.
- [`<del>`](https://developer.mozilla.org/HTML/Element/del): An element for displaying deleted text.
- [`<dfn>`](https://developer.mozilla.org/HTML/Element/dfn): An element indicating its contents are a definition.
- [`<ins>`](https://developer.mozilla.org/HTML/Element/ins): An element for displaying inserted text.
- [`<kbd>`](https://developer.mozilla.org/HTML/Element/kbd): An element for displaying keyboard shortcuts.
- [`<mark>`](https://developer.mozilla.org/HTML/Element/mark): An element for displaying highlighted text.
- [`<samp>`](https://developer.mozilla.org/HTML/Element/samp): An element for displaying sample output.
- [`<var>`](https://developer.mozilla.org/HTML/Element/var): An element for displaying mathematical variables.
- [`<embed type="mimetype" src="url"/>`](https://developer.mozilla.org/HTML/Element/embed):
An element for generic embedded content. `<object>` is generally slightly preferred, but `<img>`, `<audio>`, `<video>`, and the like are preferred over both of them.
- [`<object type="mimetype" data="url">`](https://developer.mozilla.org/HTML/Element/object):
An element for displaying generic embedded content. Generally slightly preferred over `<embed>`, but `<img>`, `<audio>`, `<video>`, and the like are preferred over both of them.
- [`<menu>`](https://developer.mozilla.org/HTML/Element/menu): Officially identical to `<ul>` in syntax and semantics. Doesn't have much of a reason to exist.
- [`<progress value=50 max=100>`](https://developer.mozilla.org/HTML/Element/progress):
A worse version of `<meter>`. Like, this is *exactly* `<meter>`, but without the `min`, `low`, `high`, and `optimum` attributes. Why??
|