Specify How to Handle Superscript and Subscript Characters

Open
#786 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
html

Research direction

Begin with the linked WHATWG section on the sub and sup elements, then review its existing guidance and the examples in the issue. Done means the specification clearly states how naturally superscript or subscript characters should be handled and whether they are preferred over equivalent elements.

Written by the indexing model from the issue text.

Description

clarification document conformance

https://html.spec.whatwg.org/multipage/semantics.html#the-sub-and-sup-elements

The spec should specify a view on whether or how to specify sub and sup elements for text components which are naturally subscript or superscript and not relevant to MathML. For example, these characters might include ¹²³ and ₁₂₃.

(It's arguable whether "[i]n general, authors should use these elements only if the absence of those elements would change the meaning of the content" applies especially in light of the first example, involving honorifics, where sub and sup appear to be being used purely for presentation purposes.)

The spec should either specify that, in cases of naturally raised or lowered script, these elements are (A) allowed, but not necessary in these instances or (B) should be avoided because they are redundant. I can't see them adding any semantic value for in the case of, say, footnote markers because the a[href] element will already be serving that purpose.

It also be nice to see some spec text mentioning whether these characters are preferred over using the elements in tandem with an ordinary character (e.g., 1 versus ¹).

Dominant language
HTML
Stars
9.4k
Forks
3.2k
Avg merge
3d 9h
Merged PRs (30d)
38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from whatwg/html

All issues in whatwg/html

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.