2 ms·
Here’s an example of <code> in titles being quite valuable: https://chrismorgan.info/blog/make-and-git-diff-test-harness/ https://chrismorgan.info/blog/make-and
by chrismorgan 3mo ago
Here’s an example of <code> in titles being quite valuable: https://chrismorgan.info/blog/make-and-git-diff-test-harness/ https://chrismorgan.info/blog/make-and-git-diff-test-harness....
Inferior plain text: Using make and git diff for a simple and powerful test harness
Better plain text: Using `make` and `git diff` for a simple and powerful test harness
Better HTML: Using <code>make</code> and <code>git diff</code> for a simple and powerful test harness
I use the second for the <title> and og:title on my site, and the third in the <h1> and feeds. It will unfortunately be turned into the first by some feed readers, but that’s their problem. (Some feed readers do accept a subset of HTML phrasing content.)
> If it shouldn't be rendered in a different way for obvious reasons
I don’t perceive your obvious reasons.
- tjansen 3mo agoI agree that it makes sense on that page. But only because the rendering of the page is completely under the control of the author, and the page shows only that one page. It's different if the text is rendered by an RSS reader in a different context. You don't know the font, color, or text weight it is rendered with in an RSS reader (which also depends on the context, like unread posts being bold). Imagine the same title in a list of post titles. I think it would stick out and make the list much harder to read.
- gchamonlive 3mo agoIf html in titles were an opt-in feature from the beginning none of this discussion would be happening
- chrismorgan 3mo ago> Imagine the same title in a list of post titles. Sounds wonderful. I think you aren’t realising that it’s already easy to abuse this stuff, with uppercase and exotic Unicode letters <https://yaytext.com/ https://yaytext.com/> and such. But people don’t abuse it in feeds. I’m not talking about allowing <font face=Impact style=color:red>, just some relevant semantic HTML elements like <code>, <em> and <kbd>, which are pretty harmless to add, and useful. Perhaps I should have gone with the MATHEMATICAL MONOSPACE characters for my plain text title. Alas, HN strips them. Demo in https://temp.chrismorgan.info/2026-08-02-titles.html https://temp.chrismorgan.info/2026-08-02-titles.html. Doesn’t look any good for me with my specific fonts, would look better for some people.
- mcv 3mo agoI would really strongly prefer titles to work the same way they do in html, which means plain text. Why should feed titles need a different standard than html titles?