Talk:TDE Wiki Style Guideline
On being “semantic”
It sure is nice to format text in such a way that the reader can tell code snippets etc. from regular text reliably. That said, “being semantic” is not the same as “[using] visual styles to make it easier to tell apart different kinds of information.” Quite a bit on the contrary, “semantic” markup wouldn't really be concerned with visual presentation at all, but simply denote what things are. This is a good thing, generally speaking, because not all readers access text visually, and among those who do, some might need things to be styled in a particular way because they're visually impaired.
Sadly, the whole approach has been overdone to an extent ridiculously beyond useful in HTML 5. So, the most prominent example out there is also the worst one imaginable, which has me think that any talk about “being semantic” should probably be left out of a reasonable style guideline.
Apropos “semantic” markup: Putting text inbetween <tt>
and </tt>
doesn't really denote any useful meaning. The HTML 4.01 specification says that pretty clearly in the definition of the TT
element: “Renders as teletype or monospaced text.” In other words, it's purely for visual styling. As far I can see, the HTML 5 specification doesn't even include that element anymore, probably because it's not “semantic.”
Given all that, I think it's probably a good idea not to use <tt>…</tt>
at all.
File and directory names could simply be formatted as code because, at least in a command-line environment, they are either command input (first) or command output (later). I'd even go one step further and say that, for text on the Web, using <code>…</code>
for actual code and everything that is either ("literal") input or output in text mode is as “semantic” as it gets. That's what I do on my website and, as far as I can see, it works pretty well.