Hacker News new | past | comments | ask | show | jobs | submit login

Ack. Yeah, the first one is my mistake looking at it again - although I would argue this element is relatively underused because it's not something you would need outside of contexts where printing is a concern - SE is a slight exception in that they are starting from print transcriptions in most cases.

I am aware of the distinction, I only used that way b/c HN doesn't really have a good way to indicate code without multiple spaces or just blindly using the ` character which is...not great.




<cite> does have a default browser style (italic), Standard Ebook's use of <i> within it would be redundant on the web, I don't know if the conventions are different in EPUB.

How to use <cite> is often misunderstood. Many think it can be used to identify the author of a quotation but it should only be used to name the work a quotation is from. Standard Ebook placed it inside the <blockquote> but I've also seen it placed after <blockquote>, I don't know whether both are considered correct or if it's a point of disagreement; to me, <blockquote> should contain only the quoted material itself but I understand the appeal of having the quote and its source be neatly contained within one semantic element.

Using the Markdown convention of putting backticks around `code` may not be great but at least it won't be confused for the wrong actual code.


SE Editor-in-Chief here. We include <i> within <cite> because 1) reading systems often have different default CSS which may not even recognize <cite> and 2) <cite> often contains both a title and an author, and in those cases we want only one or the other to be italicized. SE's default CSS for epigraphs (probably the most common place where <cite> is found) is to give <cite> small caps, italicize the title if there is one, but don't italicize the author.

I believe our use of <cite> predates the modern definition of its use, and in any case it's so infrequently found in a web context that I don't think there's much agreement about how it should be used anyway. (For example MDN says the work title must be in <cite>, but at SE we often only include an author name, like <cite>--Shakespeare</cite>.)


Interesting, the permissible content in <cite> is mentioned as an example of conflict between the HTML standard as maintained by the W3C and that maintained by WHATWG [0] (W3C allows title and/or author, WHATWG title only). Since WHATWG has been the sole maintainer for a few years, I guess their definition "won."

[0] https://en.wikipedia.org/wiki/HTML5#W3C_and_WHATWG_conflict




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: