How To Make a Web Site the Modern Way. Part 8: Tables!

Before I jump into the proper way to use tables, I’m going to share an anecdote that should bring a smile to the face of anyone who’s done this stuff for a while.

A few months ago I was both pleased and surprised to discover a web developer who didn’t really know how to lay out a page using tables. He had a sense of how it might work, but had never really done it. I was having him help out with an HTML email (where tables are still the safest bet) and the whole thing was a novelty for him. Looking at it, this makes sense as he’d been at the job for only a few years so he learned entirely in the modern era and he was lucky enough to only learn from good sources. Still, it was a new phenomena for me- encountering a developer who was purely from a CSS-based layout world.

Yes! We’re winning.

If you don’t know what I’m talking about when I talk about tables for layout, move along. There’s nothing to see here.

Anyway, tables.

Tables

Tables are for Tabular Data

Here’s a table full of data.

Continue reading “How To Make a Web Site the Modern Way. Part 8: Tables!”

You Probably Didn’t Notice – This Site is Now HTML5

I did the conversion last week. As I’ve talked about blogs and HTML5 are so natural the whole conversion probably took no more than 8 hours. Of course, that 8 hours was spread out over a few days. Which is one of the big reasons I didn’t post anything last week. I was busy getting this site moved into the future.

I’ve now got 3 sites running on the shiny new futurespec and I can now say I officially like the new semantic elements. I also feel like I’m getting a good handle on them.
Continue reading “You Probably Didn’t Notice – This Site is Now HTML5”

How To Make a Web Site the Modern Way. Part 7: Best Practices for Lists (UL, OL, DL)

Lists! They might seem boring, but if you look at a lot of site source code (good sites at least,) you’ll see a lot of lists. A lot of obvious content on the net is in the form of lists (which is why there are three separate constructions for them) and a few years ago we started using them for less-obvious, but still valid reasons.

Using Lists as Menus

The biggest, non-obvious, use of lists is for menus. Someone, somewhere, pointed out that menus were just lists of links. Couple that insight with the power of CSS to bend boring old lists to the designer/developer’s will and we had a de-facto standard on our hands.

Here’s what the menu system for DrunkenFist.com looks like. It’s a lot of code, but it’s a fully-realized version of the pattern, so it’s useful to look at in whole. As a note, this is an HTML5 site, so the nav element is in place signifying to browsers that “the following block represents site navigation.” I’ll be covering the new HTML5 elements as the very last post on the body.
Continue reading “How To Make a Web Site the Modern Way. Part 7: Best Practices for Lists (UL, OL, DL)”

A Quick Examination of the Memory and Perfomance Ramifications of CSS Sprite Dimensions

I recently ran into an interesting CSS Sprite. It contains what appears to be all of a web app’s site’s icons. What was interesting was the fact that it’s a 32 Bit PNG at 1500 x 1500 pixels- many of which are empty. Here’s what it looks like shrunk down for easy consumption and the empty space colored pink for emphasis.

As you can see there’s an awful lot of empty space. It’s mostly empty space. Between the huge dimensions and the empty space at how they would affect memory usage and front end performance.

I did a couple of tests. One was looking at the memory footprint of five sample pages in Chrome and the other was measuring download times with WebPageTest.

I’ll go through each of the variations I tried and then we’ll look at the results.

Won’t that be fun?

Continue reading “A Quick Examination of the Memory and Perfomance Ramifications of CSS Sprite Dimensions”

How To Make a Web Site the Modern Way. Part 6: Best Practices for Common HTML Elements (IMG, A)

We’ll finish up our tour of the body tag with several posts featuring general notes about common content elements. I’ll be taking my time with these as getting this stuff right will go a long way towards getting the most out of your site.

Comfy?

On with it then.

Links <a>

The link is the engine of the web. The concept of Hypertext (the H in HTML) itself is expressed in the power of the link. Google is Google because of the power of links. There is no better place to start.

Basic usage

<a href="http://www.drunkenfist.com/"  
        class="contact" 
        title="my personal site" 
        rel="me">DrunkenFist.com</a>

Write Good Link Text

For body copy you want to write link text that is descriptive of the link destination. generally this means a short phrase (5-10 words, depending on who you ask) that clearly describes the link. For that reason “click here” is generally not the greatest link text. For a live example and more on this topic take a look at link chapter of the the US Government’s Research-Based Web Design & Usability Guidelines. It’s full of really interesting tips on handling links.

For the SEO-minded, the above advice has the added bonus of generally including keywords which flow link juice and context to the targeted page.
Continue reading “How To Make a Web Site the Modern Way. Part 6: Best Practices for Common HTML Elements (IMG, A)”