![]() | Ned Batchelder : Blog | Code | Text | Site Pre tags in comments » Home : Blog : July 2008 |
Pre tags in commentsMonday 21 July 2008 Just a quick note: after far too long, the comments on this blog now support the <pre> tag so we can talk about code if need be. Thanks for your patience!
tagged:
site» 8 reactions | |
Comments
sounds good, thanks!Why not use the <code> element for code?
# Using code element
import this
if 1:
print 'abc'
# Using pre element import that if 1: print 'abc'That's good news, because I thought I was coming down with a code...
I didn't use <code> because it's one of those relics from HTML that I forgot even existed. Why not use <samp>? <pre> covers it all, and has the advantage that it also implies not flowing text, which is important. I wanted to give people *a* way to do what they need, not *all* ways.
Sorry, was just meant to be a friendly suggestion.
BTW, from the HTML spec: SAMP:Designates sample output from programs, scripts, etc.
/anal
Anyway, please don't let my noise distract from your excellent blog.
And anyway, I think <code> is supposed to be used for inline text, not for blocks. If I remember correctly, at least.
_______ ________________________ / ___\_ o O O _( I wonder if Ned knows )____ /====(_____\___---_ o _( that he's opened up his blog ) | \ (_ to all kinds of abuse. ______) | |@ (_______________________) \ ___ / \ __----____--_\____(____\_____/ ==|__----____--______| / / \____/)_ / ______) / | | | _| | ______\______________|______ / * * \ /_____________*____*___________\ / * * \ /________________________________\ / * \ /__________________________________\ | | |________________________| | | |________________________|@Adriano
You are quite right. I'll shut up now.
Add a comment: