Day 71 of 100DaysOfSpec, cite, q, and dfn elements
I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft's official opinion of the spec. Subsections not listed below were read without comment.
Currently reading in 4.5 Text-level semantics.
UAs = user agents = browsers and other HTML document parsers/renderers
4.5.6 The cite element
“The cite element represents a reference to a creative work. It must include the title of the work or the name of the author (person, people or organization) or an URL reference…”
- No need to take such a literal tack with “creative”: pretty much any body of text created by a human being will do.
- What might be unclear from the definition of
citeis that it doesn’t contain the text content of the reference itself, just the title/name of where you got it from.
4.5.7 The q element
“The q element represents some phrasing content quoted from another source.”
- The UA inserts the quotation marks, so you shouldn’t add them yourself.
- Attributes include your standard global attributes, as well as
cite, which is a link out (valid URL) to the original source or more information. - The
qelement and plain text contained in quotations are equally semantic/valid ways of marking up a quotation from another source.
4.5.8 The dfn element
“The dfn element represents the defining instance of a term.”
- The definition that matches the term in the
dfnneeds to be included in the nearest paragraph / description list group / section ancestor. - What term exactly is being defined:
titleattribute, if set on thedfnelement, otherwise…- …if there is only one child element (including loose text), that is, an
abbrwith atitleattribute, the term is thatabbr’stitle, otherwise… - …it’s the
textcontent of thedfnelement.
- The
titleattribute on thedfncontains ONLY the term being defined. dfndoes not inherittitlefor use in this way.- “An
aelement that links to adfnelement represents an instance of the term defined by thedfnelement.”