Skip to content

Add more HTML entities (please see FAQ) #5121

Open
2 of 2 issues completed
Open

Description

@ygoe

There's   for U+00A0. It's a full-width no-break space. It can be used between numbers and their short unit names, or in other places.

Typography and regional norms require (or at least recommend) using a thin no-brak space (or narrow no-break space) in several places:

  • As thousands separator, Source or DIN 5008 (to avoid ambiguous presentation of point or comma)
  • Between abbreviated words like “z. B.” (German: zum Beispiel), Source
  • As fine space before certain punctuation in French, Source

(These are the first and best sources I could find now. There may be better or more authoritative sources available, but they're usually hard to find.)

While it is technically possible to create a keyboard layout that produces this character, not many users have this installed and even then it's hard to distinguish it from other space characters when reading and revising text. Most editors don't even show a replacement symbol for this space character.

AFAIK Wikipedia suggests writing   in these places. And that's probably a good idea in team projects as well. But this is actually the wrong character in these places.

To use the correct narrow no-break space, one has to use a different HTML entity representation, like   or   which are frankly hard to remember or recognise.

As a solution, the new entity &nnbsp; should be added to HTML to make it easy to write readable text following the correct typographic rules and recommendations.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    addition/proposal
    needs implementer interest
    topic: parser
    on Dec 3, 2019
  2. kosek commented on Dec 18, 2019

    @kosek

    If new entity will be added effort should be coordinated with MathML to keep entity definitions synchronized -- https://w3c.github.io/xml-entities/

  3. ygoe commented on Jun 7, 2020

    @ygoe
    Author

    Mozilla is not interested in this. I guess that's a bad starting point already? I don't have the best experiences with the Chrome developers, maybe I'll try it there anyway.

    Unfortunately, entities is something that's not extensible in HTML, so I can't even run my own little happy solution.

  4. Celdron commented on Aug 10, 2020

    @Celdron

    If HTML standard evolves, Mozilla, and others, must follow the new specifications, that's an evidence.

    I'm currently interested about having &nnbsp;, or equal, entity for a French wiki project, as narrow non-breaking space is recommended in some cases, as explained by ygoe.

    Futhermore, HTML entities exist for a numerous characters, in my opinions, almost never used, like ≺ and such.

  5. added
    i18n-tracker
    i18n-alreq
    on Aug 11, 2020
  6. r12a commented on Aug 11, 2020

    @r12a

    In my opinion this would be extremely useful for French authors, but also for other languages. The NNBSP character was initially added to Unicode for Mongolian suffix handling, where it is important to visually distinguish between spaces separating suffixes and those separating words. It is also being proposed as an ideal fit for a morphological separator in the numerous languages written in the Canadian Aboriginal script (see w3c/amlreq#4). An entity would significantly help authors produce correct (and better machine-readable) text in all these languages.

    [@annevk could you add i18n-mlreq and i18n-amlreq labels to the repo, so i can alert those folks to the discussion? Thanks.]

    Here is an extension of this issue, which i can raise in a new issue if preferred.

    There are other invisible characters for which a named character reference would be very useful for producing correctly authored Unicode text, for the same reasons as mentioned in the first comment. Here, for example, is a list of formatting characters used for Arabic, but most are essential characters for all RTL script-based languages.

    Characters with entities:

    ‍
    ‌
    ‏
    ‎
    

    Characters without entities:
    RLI
    LRI
    FSI
    PDI
    RLE
    LRE
    PDF
    RLM
    LRM
    CGJ
    ALM

    Keyboards generally don't address the problem of inputting the characters, but it's also a problem that the characters themselves are invisible. It would really help to have Named character references. As someone who works with people who use these languages, and works with them myself, it seems to me that from a user's perspective it would be well worth the effort to add them. I don't remember why that hasn't happened before now.

  7. annevk commented on Aug 14, 2020

    @annevk
  8. xfq commented on Aug 15, 2020

    @xfq
  9. added
    i18n-amlreq
    i18n-mlreq
    on Oct 30, 2020
  10. hsivonen commented on Oct 30, 2020

    @hsivonen
    Member

    I believe I've commented previously along the following lines when this has come up:

    1. For wiki projects, it's irrelevant whether this is in HTML. The wiki software processes the wiki syntax before generating HTML output, so wiki software can introduce whatever macro expansions its developers see fit and users find useful.
    2. In the case of HTML itself, I think the backward-compatibility characteristics of this feature request are bad. The requested feature doesn't expand the expressiveness of HTML in any way: You can already express U+202F unescaped in UTF-8 or escaped as a numeric reference. However, if a named entity was added, it would break in the currently-existing HTML parsers (not only in the currently-existing browsers). This could either lead to unwanted breakage or to lead to non-usage of the feature (i.e. using the numeric form or unescaped UTF-8 anyway for better compat).
    3. Making this change would set a precedent for others to request named entities for characters they find important causing a repeat of the previous point over and over again.
  11. annevk commented on Oct 30, 2020

    @annevk
    Member

    Curious to hear what others think, but I tend to agree. Perhaps the best course of action here would be to update https://github.com/whatwg/html/blob/master/FAQ.md and close these type of feature requests.

  12. 15 remaining items

  13. added
    agenda+
    on Dec 14, 2023
  14. Crissov commented on Dec 14, 2023

    @Crissov

    What exactly is the I18N proposal to be discussed?

    Introduce named character references for …

    1. … some specific non-spacing (control) characters?
    2. … all existing non-spacing characters?
    3. … all existing and future non-spacing characters?
    4. … some specific non-spacing and whitespace characters?
    5. … all existing non-spacing and whitespace characters?
    6. … all existing and future non-spacing and whitespace characters?
  15. aphillips commented on Dec 14, 2023

    @aphillips
    Contributor

    @annevk

    Thanks! Let's look for a suitable time slot. I'm not familiar with HTML's call schedule. Would it be possible to do a week later (assuming you have calls weekly??) such as the 18th? That way we could include @r12a, who has previously contributed on this thread. We can also host you in our regular call (Thursdays at 7 AM Pacific)

    @Crissov

    We would like to discuss the possibility of additions of this type in general. We have specific existing non-spacing characters and, it appears, perhaps a few specific whitespace characters in mind. Obviously, if we "broke the dam" on additions, there is also the question of establishing criteria for any future additions. We do not propose to add named entities in a broad or general sense.

  16. ygoe commented on Dec 14, 2023

    @ygoe
    Author

    Maybe, what sets this one apart from others is that it's invisible. You could potentially use smart input methods to generate just about any visible character and anybody else reading the document would see it. Of course you can also use smart input methods to generate special white-space characters (like I do with my modified keyboard layout), but the problem is that other people editing the document likely won't see it if they're not familiar with the various spaces and have the tools to see them. So to be safe, it could be a good solution to use a presentation that makes it visible.   is already widely used in Wikipedia content, for example.

    So if you're looking for criteria, this might be one. 🙂

  17. annevk commented on Dec 15, 2023

    @annevk
    Member

    @aphillips for that time slot the next one is Feb 22. There are two other meetings, but one is not useful for Europe and one is not useful for the US. Getting WHATNOT participants to join another meeting could maybe work, but it probably requires explicitly pinging some people and making sure they can all make it which is not work I can sign up for right now. Maybe next year.

  18. aphillips commented on Dec 15, 2023

    @aphillips
    Contributor

    @annevk Thanks. This isn't urgent, so let's go for February? Thinking aloud, perhaps we (meaning me) should make a list of I18N issues that could use attention ahead of time and we can have a section of the call for I18N?

  19. annevk commented on Dec 15, 2023

    @annevk
    Member

    Sounds good to me!

  20. removed
    agenda+
    on Feb 22, 2024
  21. changed the title [-]Add &nnbsp; entity for U+202F[/-] [+]Add more HTML entities (please see FAQ)[/+] on Oct 14, 2025
  22. spixi commented on Oct 14, 2025

    @spixi

    @annevk
    Thank you for merging my proposal with this issue. &Szlig; is special, because the lower case ß already exists and there is no logical reason, why the uppercase letter should not have its own named entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposali18n-alreqi18n-amlreqi18n-mlreqi18n-trackerneeds implementer interesttopic: parser

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions