Web
    Web Overview
    URL
    HTML
    CSS
    Markdown
    Progressive Web App
    Web Frameworks
    Web Hosting

HTML

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:

( fàn )

Unicode

  • Hex: &#x16D2; for ᛒ
  • Decimal: &#8364; for €
  • Entity name: &euro; 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.

<a href="..." target="_blank">...</a>