Tag: format

Perfect Pre Tags

Posted on November 9, 2009 in Presentation, Structure by Jeff Starr

If you operate a website that features lots of code examples, you know how important it is to spend some quality time styling the <pre> element. When left unstyled, wild <pre> tags will mangle your preformatted content and destroy your site’s layout. Different browsers treat the <pre> tag quite differently, varying greatly in their default handling of font-sizing, scrollbar-rendering, and word-wrapping. Indeed, getting your preformatted code to look consistent, usable, and stylish across browsers is no easy task, but it certainly can be done. In this article, I’ll show you everything you need to create perfect <pre> tags.

First thangs first

Before getting into it, let’s take a moment to ensure we’re all on the same page. The (X)HTML <pre> element is used to display preformatted text, code, or just about anything else. pre tags are ideal for multiple lines of code or text that need to retain character spacing, display unformatted characters, keep inherent line breaks, and so on.

Continue Reading

Sexy HTML List Tricks

Posted on August 16, 2009 in Presentation, Structure by Jeff Starr

Behold the ubiquitous list elements, <ul> and <ol>! These two sexy elements help millions of websites display lists of information in clean, semantic fashion. Without them, we’d be crawling around like filthy cavemen, eating dirt and howling at the moon.

But these list elements aren’t just sexy, they are also extremely flexible, enabling us humble designers to create robust list configurations that are semantically versatile and highly customizable. We all know how to throw down a basic list:

Continue Reading

Series Summary: Obsessive CSS Code Formatting

Posted on September 10, 2008 in Presentation by Jeff Starr

My favorite series of articles here at Perishable Press, the “Obsessive CSS Code Formatting” articles explore the esoteric minutia involved with producing clean, well-formatted CSS code. From indention and spacing to opening and closing brackets, the obsessive CSS code series explores techniques and tricks used to transform ordinary stylesheets into streamlined masterpieces of inspiring beauty. Creating poetic CSS integrates the high art of employing consistent coding patterns and formatting methods with the practical functionality of proper syntax, logical structure, and concise delivery. These posts are extremely subjective, opening dialogue concerning the obsessive-compulsive behavior many of us embrace while implementing the powerful and essential coding language that is CSS. So, without further ado, here is a periodically updated list showcasing the all of the currently available articles in the series..

If you have yet to do so, Subscribe to Perishable Press for all the latest CSS formatting tips!

Greenwich Mean Time (GMT) Formats

Posted on September 25, 2006 in Websites by Jeff Starr

There are currently three formats for expressing date/time in Greenwich Mean Time (GMT). All examples represent the date, "July 04, 2050". The time for all three formats is expressed as "hour:minutes:seconds".

Here is the preferred, standard format1 for the Internet. This format is defined by RFC 1123 (updated from RFC 822):

# RFC 1123 Standard GMT Format
Mon, 04 Jul 2050 07:07:07 GMT

The programming language C uses the ANSI standard format1 in its asctime():

# ANSI Standard GMT Format
Mon Jul 4 07:07:07 2050

The RFC 850 format2 is now obsolete (RFC 1036) and should not be used:

# RFC 850 Standard GMT Format [obsolete]
Monday, 04-Jul-50 07:07:07 GMT

1 Weekday abbreviations: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Month abbreviations: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

2 Weekday abbreviations: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Month abbreviations: January, February, March, April, May, June, July, August, September, October, November, December

References