m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2021-02-16 23:32:48 -0500
committerMarcin Chrzanowski <m@m-chrzan.xyz>2021-02-16 23:32:48 -0500
commit334fa6ba0b6b3d4ced4b963980febde56547bd12 (patch)
treebed488582c54e157805a44738874d104acc5b718
parent5c1a10b93a5aa2d017e4bf259e4c3bb4ab3fc137 (diff)
Add HTML reminders
-rw-r--r--html.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/html.md b/html.md
new file mode 100644
index 0000000..b8b7d43
--- /dev/null
+++ b/html.md
@@ -0,0 +1,24 @@
+# HTML stuff
+
+## DOM manipulation
+
+ // create new element
+ document.createElement('button')
+
+ // append child
+ element1.appendChild(element2)
+
+## Elements
+
+### Button
+
+By default, a button has type `reset` or `submit`, both of which reload the
+page. To avoid reloading:
+
+ <button type='button'></button>
+
+### Checkbox
+
+To check by default:
+
+ <input type='checkbox' checked>