Now Available! InterACT with Web Standards: A Holistic Approach to Web Design

InterACT with Web Standards coverInterACT with Web Standards: a Holistic Approach to Web Design is available today.

This announcement is a BIG DEAL.

This book puts everything you need to teach a class in web design or development with web standards into your hands. The book is easy to use in connection with InterACT’s 17 courses in 6 learning tracks making it the perfect tool and resource for teaching or learning contemporary web design best practices.

If you are a student who wants to learn about building a web site with web standards, this book will lead you there.

For educators, your semester will be a snap to plan with this book. It’s all right there for you.

The book is published by New Riders (2010). There are 10 authors. The major contributor being Chris Mills, with additional expertise from Erin Anderson, Virginia DeBolt, Derek Featherstone, Lars Gunther, Denise Jacobs, Leslie-Jensen-Inman, Christopher Schmitt, Glenda Sims and Aarron Walter. I’m really proud to have been a small part of making the book a reality, because I think the book is going to be very important to students and teachers who are looking for the a reliable resource for web design best practices.

In addition to the writers, a number of other people worked to bring this book to life. They include Aarron Walter as project manager, Patrick Lauke as technical editor, Jeff Riley as development editor, Leslie Jensen-Inman as creative director and Jessi Taylor as book and site designer.

Many kudos go to Leslie Jensen-Inman and Jessi Taylor. When you see this book and hold it in your hands you will realize what a work of art it is from a design and typography point of view. It’s a beautiful book.

Take a look at the table of contents:

  1. InterACT
  2. Tools
  3. Learning on the Web
  4. Internet Fundamentals
  5. Writing for the Web
  6. Information Architecture Intro
  7. Site Planning
  8. Content Analysis
  9. Content Strategy
  10. HTML Intro
  11. CSS Intro
  12. <head>
  13. Headings and Paragraphs
  14. Whitespace
  15. Links
  16. Images
  17. Lists
  18. Tables
  19. Forms
  20. Floats
  21. Positioning
  22. Accessibility Intro
  23. Accessibility Helps
  24. Accessibility Testing
  25. Bringing it All Together
  26. Index

The InterACT with Web Standards book site has everything you need to know. There, you’ll find links to purchase the book, links to code examples from the book, links to bonus content, and links to the sample project. The site has links to information about InterACT, OWEA, and the Web Standards Project. You can take a peek inside the book, read some reviews, grab links to all the resources cited in the book, and MUCH MORE.

Buy now and take advantage of this limited time offer tweeted by @waspinteract.

InterACT With Web Standards, the first book from The Web Standards Project, is out. Save 35% on it with code INTERACT. http://cot.ag/9RS4rEMon May 17 16:00:20 via CoTweet

Using first-letter and first-line

The first-letter and first-line CSS selectors are among the pseudo-selectors. Pseudo-selectors exist not as discrete elements, but as variable elements that exist only as a factor of context or browser state.

First-letter is used to select only the first letter of an element. The syntax is:

p:first-letter {font-size: 1.8em;}

The CSS properties that can be styled for the first-letter selector are font, color, background, text-decoration, vertical-align, text-transform, line-height, margin, padding, border, float and clear.

First-line works with similar syntax.

p:first-line {font-style: italic;}

You can use descendant selectors. For example, if you applied a class called .first to the first paragraph of each section of your page, then a selector like

p.first:first-line {font-style: italic;}

would work.

HTML table elements: thead, tfoot, tbody

You can create horizontal sections in a data table by grouping rows within the table with the elements <thead>, <tbody> and <tfoot>. These sections or groups of rows then take on properties that can be useful in terms of styling and are helpful when printing multipage tables.

One or more table header rows can be formatted as <thead>. There can only be one <thead> element in a table. Likewise, you can only have one <tfoot> element per table. It can include one or more rows of footer information.

The main body of the table can be formatted as <tbody>.

Here’s the interesting part. The <thead> and the <tfoot> must be marked up before the <tbody> in the document flow. Here’s a super simple example:

<table>
<thead>
<caption>An optional caption</caption>
<tr>
<th>A header</th>
</tr>
</thead>
<tfoot>
<tr>
<td>repeat the header info</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Some data</td
</tr>
</tbody>
</table>

There’s a reason for this order in the document flow. It’s done so that the browser can render the top and the bottom of the table before beginning on the main part of the table.  This also allows the header and footer section to be printed on every page when a long table is printed.

If the table is long enough to require scrolling on a screen or multiple pages in print, it’s a good idea to use the footer area to repeat or summarize the column header information from the headings.

In terms of CSS, these additional elements in the table give you additional hooks for CSS rules.

Support for these elements varies among browsers. In some browsers, when scrolling a long table, the <thead> and <tfoot> elements remain fixed while scrolling the <tbody>.

Useful links: Jane McGonigal, Aviary in ed, hints in text boxes

New Game Designed to EVOKE a Better World tells about several projects involving game playing that Jane McGonigal is leading. These virtual reality games are designed to solve difficult real life problem and make real life changes. This excellent article by Kim Pearson also contains video of a recent TED Talk by McGonigal, which is a must-see.

Aviary continues to grow and improve. It’s now available in Google Docs. This is good news for educators, as this video shows. Aviary is readying an education program. If you’d like to be a beta tester for this education program, sign up here.

Don’t put hints inside text boxes in web forms from UX Matters give some excellent reasons why you should stop teaching anyone to do this, if you still are.

Useful LInks: 7 HTML Working Drafts, CSS border radius, JQuery

Seven HTML related working drafts published is reported on 456 Berea Street. The HTML 5 differences from HTML 4 draft was especially interesting to me.

Students may like CSS Border Radius. Insert a value for all corners or individual corners and grab the code. For those who don’t like typing.

Sitepoint is doing a series on jQuery for newbies. So far they’ve published Part 1 on selecting elements and manipulating CSS and Part 2 on progressive enhancement and the DOM.

HTML5 working draft on italic and bold

As a comment to  em and his buddy strong, Tony Fahnestock sent a tweet mentioning the way the elements <i> and <b> are being treated in the working draft of HTML5 in a section called “text-level semantics.”

Here’s how the <b>, or bold, element is defined there.

The b element represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is boldened.

The following example shows a use of the b element to highlight key words without marking them up as important:

<p>The <b>frobonitor</b> and <b>barbinator</b> components are fried.</p>

In the following example, objects in a text adventure are highlighted as being special by use of the b element.

<p>You enter a small room. Your <b>sword</b> glows
brighter. A <b>rat</b> scurries past the corner wall.</p>

Another case where the b element is appropriate is in marking up the lede (or lead) sentence or paragraph. The following example shows how a BBC article about kittens adopting a rabbit as their own could be marked up:

<article>
 <h2>Kittens 'adopted' by pet rabbit</h2>
 <p><b>Six abandoned kittens have found an unexpected new
 mother figure — a pet rabbit.</b></p>
 <p>Veterinary nurse Melanie Humble took the three-week-old
 kittens to her Aberdeen home.</p>
[...]

The b element should be used as a last resort when no other element is more appropriate. In particular, headings should use the h1 to h6 elements, stress emphasis should use the em element, importance should be denoted with the strong element, and text marked or highlighted should use the mark element.

I want to emphasize this sentence: The b element should be used as a last resort when no other element is more appropriate. When semantic meanings are considered, almost any other element is probably more appropriate.

Let’s stray off topic a moment to talk about <mark>. The <b> is defined as a stylistic element that conveys no extra meaning. A new element, <mark> is suggested for highlighting text. Here’s what the working draft says about <mark>:

The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader’s attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user’s current activity.

Semantically speaking, it seems to me that <mark> conveys meaning for highlighting text to a greater degree than <b>, which is used for stylistic reasons in HTML5, as it has been in HTML4 and XHTML.

Back to the <i>, or italics, element. From the working draft:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.

Terms in languages different from the main text should be annotated with lang attributes (or, in XML, lang attributes in the XML namespace).

The examples below show uses of the i element:

<p>The <i>Felis silvestris catus</i> is cute.</p>
<p>The term <i>prose content</i> is defined above.</p>
<p>There is a certain <i lang="fr">je ne sais quoi</i> in the air.</p>

In the following example, a dream sequence is marked up using i elements.
<p>Raymond tried to sleep.</p>
<p><i>The ship sailed away on Thursday</i>, he dreamt. <i>The ship had many people aboard, including a beautiful princess called Carey. He watched her, day-in, day-out, hoping she would notice him, but she never did.</i></p>
<p><i>Finally one night he picked up the courage to speak with her—</i></p>
<p>Raymond woke with a start as the fire alarm rang out.</p>

Authors are encouraged to use the class attribute on the i element to identify why the element is being used, so that if the style of a particular use (e.g. dream sequences as opposed to taxonomic terms) is to be changed at a later date, the author doesn’t have to go through the entire document (or series of related documents) annotating each use. Similarly, authors are encouraged to consider whether other elements might be more applicable than the i element, for instance the em element for marking up stress emphasis, or the dfn element to mark up the defining instance of a term.

This definition of <i> offers more proper uses for the <i> element in ways that do provide limited semantic underpinnings. Use <i> to offset text from the normal prose in ways that indicate “taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name” but not as a way to highlight text (use <mark> for that) or a way to emphasize text (use <em> for that) or a way to indicate the defining instance of a word (use <dfn> for that).

With the addition of a class attribute or a lang attribute, the <i> element can be made even more semantically self-explanatory.  HTML4 and XHTML both already encourage the lang attribute when italics are used to indicate another language, so this is not new to HTML5.

em and his buddy strong

Let’s talk about emphasis and italics and getting bold. There’s an extended family tree of HTML elements that can be used to format text as emphasized, italic or bold at our disposal. These HTML elements are not interchangable and each has a distinct position in the text formatting family.

First there’s <em>. Depending on the browser and the web page author’s style sheet, <em> can be rendered in several ways. Most often it’s visually rendered in italics, but not always. But there is one thing that’s always true of <em>. That one truth is that text marked up as <em> is always emphasized. <em> means emphasized. <em> is one of many self-describing HTML tags that tells you with its name exactly what it does to text. It emphasizes text. Maybe that emphasized text is rendered in italics, but may not. Semantically speaking, the italics aren’t the point. The emphasis is the point.

When you mark up text with <em>, do it because you intend to emphasize the text.

Then there’s <strong>. Using <strong> is a form of emphasis as well, but it differs semantically because it means strong emphasis. Depending on the browser and the web page author’s style sheet, <strong> is often rendered as bold, but not always. (On this blog, <strong> is rendered as both bold and with small caps.) The bold isn’t the point. The semantic point is that <strong> indicates strong emphasis.

When you mark up text with <strong>, do it because you intend strong emphasis.

Next we have <cite>. In the formatting world of self-describing semantic HTML, <cite> is used to mark up a citation. It most often is rendered as italic. Visually, you can’t tell a difference between <em> and <cite>. But the underlying meaning is different, the underlying semantic message is different. I can quote from Mastering Integrated HTML and CSS by using the <cite> element to indicate a book title. This element can also indicate a title of a web site or a blog.

Those are the semantic elements that may render as italic or bold.

There are two non-semantic HTML elements that render visually as italic or bold. These are <i> and <b>. If a user happens to be looking at your text, then they will see the visual cues to meaning that <i> and <b> provide. But not all users look at text. For text rendered by some means other than visual—say a screen reader or braille—there’s no meaning conveyed by <i> and <b> at all. It’s invisible. No hint of emphasis or clues to citations.  <i> and <b> are presentational HTML with no semantic underpinnings.

When you use <i> and <b>, do it for visual reasons only. Such reasons do exist. Perhaps you want to italicize the opening paragraph of a long essay for no other reason than appearance. Use <i>. Perhaps you want the links in your menu to look bold for visual reasons, but not be emphasized. Use <b>.

ADDENDUM 3/11/2010: The latest draft of HTML5, issued this week, defines the <strong> element as showing strong importance rather than strong emphasis. Presumably this semantic change will be rendered differently by a screen reader.