Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
The phrase 'crumpled heap' comes to mind.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.

user:
pass:
register,


                   

Please log in.
Before you can vote, you need to register. Please log in or create an account.

Support HTML "code" tag

For when a fixed font is best
 
(0)
  [vote for,
against]

I did look around to see if this Idea had been mentioned before, and the closest thing I could find was "ASCII Annos" (linked).

But!

Why only in annotations? I personally have done enough attempts at ASCII sketches in the main text of an Idea to know that having a fixed font available in more places than the annotations would be very convenient.

Meanwhile, standard HTML includes a tag specifically to allow a web page, usually expected to be presented to the user in a proportional font, to have a block of fixed-font text. The "code" tag does that.

I see in an another Idea, "Carriage return as [HTML line break]" (linked), [Bristolz] posted an annotation indicated that "a few oddball things are supported" -- [jutta], can we have a list of supported HTML tags on the Help page, please? (Even if the "code" tag never becomes one of them?) Thank you!

<code>
This is a test.
This is only a test.
If this text was really displayed in a fixed font,
it would be obvious.
And the HTML tags before and after
this block of text would not be visible.
</code>

Vernon, Jan 25 2011

ASCII annos ASCII_20Annos
As mentioned in the main text. [Vernon, Jan 25 2011]

Carriage returns... Carriage_20return_20as_20_3cbr_3e
As mentioned in the main text. [Vernon, Jan 25 2011]

About the HTML "code" tag http://www.htmlquic...ence/tags/code.html
Computer code is often written in a fixed font, and there are excellent reasons for that, but those reasons are mostly outside the scope of this Idea. [Vernon, Jan 25 2011, last modified Jan 26 2011]

12864 12864
The data tables in this Idea would benefit greatly from being presented in a fixed font. [Vernon, Jan 26 2011]

[link]






       In the some of the better newspapers, next to the crossword, there is a blank box which you can use for doodling in. A suitably coded box on the otherwise excellent HB format, coupled with a Chinagraph pencil, would answer many of the needs here identified.
MaxwellBuchanan, Jan 25 2011
  

       You can also doodle, scan and upload to Imageshack or whitherever. And i say yet again, i want <sub> and <sup> more than any of this.
nineteenthly, Jan 26 2011
  

       Perhaps, the other consideration is justification. i.e. If your websit design has, as a fundamental design tenet, auto-justification of text at its core, it's philosophically tenuous to incorporate something that provides the user with a layer of total control. It's autopilot vs controls on manual.   

       I'm not sure how <code> blocks behave in terms of div-wrapping. If I have a line of <code> that is wider than my browser window provides, will the browser force a break (possibly spoiling the intent of the code-block designer) or does it force the enspawnation of a horizontal scroll-bar, and/or redefine the width of the site altogether(possibly spoiling the intent of the site-designer).   

       I've seen some forums get ugly when people post something that somehow breaks the expectations of the browser, leaving users having to scroll all the way off to the right in order to read subsequent annotations.   

       Better, for situations such as this, to create some limited-dimension block-tag, specific to the site that can fit happily wherever it might be placed. That's an ask though.   

       However (or rather, if) it's addressed, the solution is likely to be non-trivial.
zen_tom, Jan 26 2011
  

       Hold on though: isn't the low-res version monospace?   

       Ah: apparently not. Looking at it now. How about Lynx though?
nineteenthly, Jan 26 2011
  

       //You’re saying it’d be hard to justify monospace?//   

       Maybe I'm getting my jargon mixed up - I'm referring to auto-wrapping text to available window/div sizes based on available whitespace 'breaks', not "kerning" or variable-size whitespace style "filling-in". I'm just recalling that in some implementations, the <code> tag (or is it the <pre> tag I'm thinking of?) is considered inviolate by surrounding div, table and other formatting tags, and so can continue to go on and on to the right, without wrapping, unless someone either ends the block, or forces a new-line/return to left-margin on purpose. Sometimes use of this (these?) tags can cause an otherwise well formatted site to 'break' and start looking unusual.
zen_tom, Jan 26 2011
  
      
[annotate]
  


 

back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle