Using custom entities in HTML documents

后端 未结 1 749
粉色の甜心
粉色の甜心 2020-12-15 07:22

tl;dr

I\'d like to understand if it is possible (and, in case, how well supported) to use custom entities in HTML documents for localization purposes.


<
相关标签:
1条回答
  • 2020-12-15 08:04

    In theory, it is possible. HTML 4.x (and several previous versions) are SGML applications so you can extend the DTD with new entities.

    In practise, every mainstream browser implements an HTML specific tag soup slurper instead of a real SGML parser so you can't do this. This is why HTML 4 has a list of SGML features to avoid and why HTML 5 isn't an SGML application.

    0 讨论(0)
提交回复
热议问题