Support `<dfn>`, `<cite>` and `<i>`?
rauschma opened this issue · 2 comments
Semantic HTML distinguishes the following kinds of italics:
-
Emphasizing text (which affects how you’d read it out loud):
Now <em>that</em> is a good idea.
-
Definition (introducing new terms):
A <dfn>bicycle</dfn> is a vehicle with two wheels.
-
Citing names, book titles, etc.:
I enjoyed <cite>His dark materials</cite>.
-
Mentioning foreign-language text:
She said <i lang="fr">au revoir</i>.
Would it make sense to support some of #2–#4 in djot? It would make the generated HTML more semantic. Options include:
{:dfn text:}
::dfn text::
{"cite text"}
""cite text""
1-3 look like #240 could address them.
4 seems different and already doable, no? (_au revoir_{lang=fr}
, with or without explicit span) (EDIT: The <i>
in your example doesn't seem very semantic though... Should rather be a <span>
, no?)
The
<i>
in your example doesn't seem very semantic though... Should rather be a<span>
, no?
This is what the HTML spec says (emphasis in bold is mine):
“The i
element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.”
“Terms in languages different from the main text should be annotated with lang
attributes [...]”
1-3 look like #240 could address them.
True! Maybe:
!dfn[dfn text]
!cite[cite text]
!i[i text]{lang="fr"}
Or, more verbose:
[dfn text]{!dfn}
[cite text]{!cite}
[i text]{!i lang="fr"}