HTML
Last Updated: 2022-04-09
Superscript and Subscript
<sup></sup>
and <sub></sub>
.
It does not work in backticks in Markdown. Use <code>a<sub>1</sub></code>
instead: a1
Ruby Characters
https://en.wikipedia.org/wiki/Ruby_character
<ruby> 饭 <rp>(</rp><rt>fàn</rt><rp>)</rp> </ruby>
<rt>
is used to specify the ruby text.<rp>
is for fallback parentheses for browsers that do not support display of ruby annotations.
The result is:
Unicode
- Hex:
ᛒ
for ᛒ - Decimal:
€
for € - Entity name:
€
for €
HTML Skeleton
<!DOCTYPE html>
<html>
<head>
<title>The Title</title>
</head>
<body>
The content
</body>
</html>
DOM
The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The DOM can be accessed by window.document
, e.g. window.document.getElementById("header");
Lang
Use the LANG
attribute to identify the language of the page.
a
Each <a>
element must contain text or an IMG
with an ALT
attribute.
Open Link in New Tab
<a href="..." target="_blank">...</a>