Chapter 1: Why Write for the Web?
Chapter 2: Reading the Web
Downloads and Utilities
- Mozilla Firefox (Open-source Web browser)
- Chris Pederick’s Web Developer Add-on for Firefox (Firefox add-on)
- Google Chrome (Webkit-based browser)
- Chris Pederick’s Web Developer Add-on for Google Chrome (Chrome extension)
- Opera (Web browser)
- Safari for Windows (Webkit-based browser)
- Microsoft Expression Web SuperPreview (Internet Explorer testing; requires Windows/IE8)
- Lynx for Windows (Text-only Web browser)
- Lynx for Mac OS X (Text-only Web browser)
Chapter 3: Creating Web Content
Downloads and Utilities
- GIMP: GNU Image Manipulation Program (Cross-platform free and open-source graphics software)
- Audacity (Cross-platform free and open-source audio software)
- Avidemux (Cross-platform free and open-source video software)
Websites
- The Secret Lives of MP3 Files (Guidance in MP3 audio preparation)
Chapter 4: Standards-Based Web Pages
Downloads and Utilities
- W3C Markup Validation Service (XHTML/HTML validator)
- W3C CSS Validation Service (CSS validator)
Websites
- Web Pages that Suck (Gallery of bad design)
- Web Standards Project (WaSP) (Standards advocacy and education group)
- World Wide Web Consortium (W3C) (Group behind the recommendations that make up many Web standards)
- CSS Zen Garden (Site of CSS designs using the exact same XHTML)
Chapter 5: Preparing to Write and Design
Downloads and Utilities
- PortableApps.com (Free and open-source Windows applications that can be run on a USB drive)
- FreeSMUG.org (Free and open-source Mac OS X applications that can be run on a USB drive)
- Notepad++ (“Notepad plus”) (Recommended free text editor for Windows; can be run from USB drive)
Download the zip package of Notepad++ (not the installer); when you unzip it, there will be two folders:
ansi
andunicode
. Throw theansi
folder away, and move theunicode
folder to your desktop or USB drive. TheNotepad++
program is inside of theunicode
folder (you can renameunicode
tonotepad++
if you wish). - TextWrangler (Recommended free text editor for Mac OS X; also available via the Mac App Store)
- WinSCP (Recommended free and open-source FTP/SFTP client for Windows)
- Cyberduck (Recommended free and open-source FTP/SFTP client for Mac OS X
- Mozilla Firefox (Recommended baseline development browser)
- Chris Pederick’s Web Developer Add-on for Firefox (Recommended Firefox add-on for Web design and development)
Chapter 6: Accessibility
Websites
- Web Accessibility Initiative (WAI) (W3C organization)
- Web Content Accessibility Guidelines (WCAG) (W3C recommendation)
- “To Hell with WCAG 2” (A List Apart article by Joe Clarke)
- Section 508 (United States government IT accessibility)
- Section 508 guidelines and standards (United States Access Board)
Chapter 7: Usability
Chapter 8: Sustainability
Chapter 9: Structured Content: XHTML Overview
Websites
- HTML Dog HTML Tag Reference (Language reference)
- SitePoint HTML Reference (Language Reference)
- Microformats.org (Language reference)
Examples
- XHTML Strict DOCTYPE (p. 94):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- The Global Structure of Web Pages (p. 96):
<html> <head> </head> <body> </body> </html>
- Content Type and Character Encoding
<meta />
Tag (p. 97):<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- Uniquely Identifying Pieces of Structure with
id
(p. 98-99):<body> <div id="header"> <h1>John Smith's Home Page</h1> </div> <div id="content> <h2>Portfolio Overview</h2> <p>Read all about <a href="portfolio.htm">my portfolio</a>...</p> <h2>Latest Projects</h2> <p>Read all about my <a href="latest-projects.htm"> latest projects</a>...</p> </div> <ul id="navigation"> <li><a href="index.htm">Home</a></li> <li><a href="resume.htm">Resume</a></li> <li><a href="contact.htm">Contact</a></li> </ul> <div id="footer"> <p> All site content is licensed for use under a <a rel="license" href= "http://creativecommons.org/licenses/by/3.0/us/"> Creative Commons Attribution 3.0 United States License</a>. </p> </div> </body>
- Associating Similar, Repeated Structures with
class
(p. 100):<p> I enjoyed Peter Jackson's <cite class="film">Lord of the Rings</cite> films, especially <cite class="film">The Two Towers</cite>, but I do not think that they were as good as the original <cite class="book">Lord of the Rings</cite> books by J. R. R. Tolkien. </p>
Chapter 10: Presentation and Design: CSS Overview
Websites
- HTML Dog CSS Properties (Language reference)
- SitePoint CSS Reference (Language reference)
- “CSS Specificity Wars” (Blog post by Andy Clarke)
Examples
- A Sample of XHTML (p. 104)
- A Sample of XHTML with a Cascade (p. 104)
- CSS Style Declarations (p. 105)
/*Pseudo-code to show selectors, properties, and values in CSS*/ selector { property: value; /*For styles that take a single value, e.g., color: blue; */ property: value, value, value; /*Commas separate values ordered by preference, e.g., font-family: Verdana, Arial, sans-serif; */ property: value value value; /*For styles that take multiple values, e.g., border: 10px solid red; */ }
- Descendant Selectors (p. 108)
- Child Selectors on Nested Lists (p. 110)
- Hanging Indents (p. 115)
Chapter 11: Rapid Prototyping
Downloads and Utilities
- Rapid Prototyping Kit (RPK)
- 7-Zip (File archive program for Windows and other operating systems)
- Yahoo! YUI Reset CSS (CSS reset file)
- jQuery (JavaScript library)
Examples
- Browsable RPK (p. 124; download your own copy)
Chapter 12: Writing with Source in a Text Editor
Downloads and Utilities
- Notepad++ (“Notepad plus”) (Recommended free text editor for Windows; can be run from USB drive)
- TextWrangler (Recommended free text editor for Mac OS X; also available via the Mac App Store)
Websites
- Newline (Wikipedia entry)
Examples
- One Page, Many Views (p. 134-137)
- Highlighting Error (p. 137)
- Format Source However You'd Like (p. 138-142)
- Indentation: XHTML (p. 141):
<div class="tip"> <h2>Indentation Makes Source Readable</h2> <p> However, some text editors require you to do your indentation manually. </p> </div>
- Indentation: CSS (p. 141):
/* Put properties on separate lines, and indent them within a selector: */ body { font-family: Helvetica, Arial, sans-serif; font-size: small; } /* Some designers indent selectors to show which selectors appear inside of others: */ div#content { width: 500px; } div#content h2 { font-size: 26px; } div#content p { font-size: 14px; } div#content p a { color: green; }
- Comment syntax in XHTML (p. 143):
<!--Here is a comment in XHTML.-->
- Comment syntax in CSS (p. 143):
/*Here is a comment in CSS.*/
- Comment syntax in JavaScript (p. 143):
/*Here is a comment in JavaScript.*/
- Commenting Out Problem Code (p. 145):
p { width: 100px; /*padding: 50px;*/ } /*Padding is changing the width, so I've commented it out for testing purposes.*/
Chapter 13: Page Metadata
Websites
- “Designing for Screen Reader Compatibility” (WebAIM article)
- MIME Types List (Webmaster Toolkit reference)
Examples
- A metadata-rich opening
<html>
tag (p. 148):<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="example-com">
- Specifying the Content Type in the
<meta />
Tag (p. 149):<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- Mismatched Character Encoding (p. 149)
- Correct Character Encoding (p. 150)
- Character Entities (p. 151)
<!--Essential XHTML character entities that *must* be used:--> < (display as <) > (displays as >) & (displays as &) <!--In certain situations, such as in JavaScript or in code examples, you might need to use:--> " (displays as ") ' (displays as ')
- Title Bar Example (p. 152)
- Linking to a Shortcut Icon or "Favicon" (p. 154):
<!--For most browsers--> <link rel="icon" href="http://example.com/favicon.png" type="image/png" /> <!--For Internet Explorer; no type must be specified--> <link rel="shortcut icon" href="http://example.com/ favicon.ico" />
- Linking to CSS (p. 155):
<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
- Linking to JavaScript (p. 155-156):
<script type="text/javascript" src="/js/site.js"></script>
Chapter 14: Page Branding
Websites
- Microformats.org
- rel-home microformat
- Revised Image Replacement (Dave Shea’s gallery of CSS image-replacement techniques)
- W3C Markup Validation Service (XHTML/HTML validator)
- W3C CSS Validation Service (CSS validator)
- Creative Commons (Content licensing)
Examples
Be sure to look at the linked examples below in Firefox with the Web Developer Add-on, using its CSS > Edit CSS feature.
- The Header (p. 160-163):
<div id="header"> <h1><a href="http://example.com/" rel="home">Site Name</a></h1> <p class="tagline"> Site Tagline </p> <ul class="accessibility"> <li><a href="#navigation">Jump to Navigation</a></li> <li><a href="#content">Jump to Content</a></li> </ul> </div>
- Figures 14.1 and 14.2: Jump to Navigation links (View using Lynx; p. 163, 164)
- Figure 14.3: Outlining the accessibility navigation (p. 165)
- Figure 14.4: Absolute positioning on the accessibility navigation (p. 165)
- Figure 14.5: Hiding the accessibility navigation with negative
left:
value (p. 166) - Figure 14.6: Adding a border to the header (p. 167)
- Figure 14.7: Adding a background color to the header (p. 168)
- Figure 14.8: Adding a boder/background image to the header (p. 169)
- Figure 14.9: Image replacement on the site title (p. 171)
- Figure 14.10: Adjusting the site tagline (p. 171-172)
- The Footer (p. 171-172):
<div id="footer"> <p class="credits"> Site information, credits, license. </p> <!--These links only work on live, web-available sites:--> <ul class="validators"> <li><a href="http://validator.w3.org/check?uri=referer" title="Validate this page's XHTML">XHTML</a></li> <li><a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validate this page's CSS">CSS</a></li> </ul> </div>
- Figure 14.11: Styling the footer (p. 174)
- Figure 14.12: Styling the site credits (p. 174)
Chapter 15: Navigation
Examples
- XHTML for a basic navigation area (p. 178):
<ul id="navigation"> <li><a id="nav-home" href="/">Home</a></li> <li><a id="nav-resume" href="/resume.htm">Resume</a></li> <li><a id="nav-portfolio" href="/portfolio.htm">Portfolio</a></li> <li><a id="nav-about" href="/about.htm">About</a></li> <li><a id="nav-contact" href="/contact.htm">Contact</a></li> </ul>
- CSS for maximizing clickable areas (p. 178):
ul#navigation a { display: block; /*Treat links as blocks*/ padding: 20px; /*Padding is also clickable*/ background-color: gray; }
- Figure 15.1: Generous boxes, but small clickable areas (p. 182)
- Figure 15.2: Generous boxes, large clickable areas (p. 182)
- Wayfinding Made Simple (p. 183-184):
ul#navigation li a:hover, ul#navigation li a:focus, body.home ul#navigation li a#nav-home, body.resume ul#navigation li a#nav-resume, body.portfolio ul#navigation li a#nav-portfolio, body.about ul#navigation li a#nav-about, body.contact ul#navigation li a#nav-contact { background-color: white; }
- Horizontal Navigation, Float Method, Automatic Width (p. 185):
ul#navigation { overflow: hidden; /*Necessary style for best handling floats*/ } ul#navigation li { float: left; /*Float items to the left*/ display: inline; /*Fix a float issue in older IE browsers*/ margin-right: 5px; /*Put some space between items*/ } ul#navigation li a { display: block; /*Maximize clickable area*/ padding: 5px 10px 5px 10px; /*Generous padding on top and bottom, less on right and left*/ background-color: #CCC; /*Background color for the items*/ }
- Figure 15.3: Horizontal navigation bar with different button widths (p. 186)
- Horizontal Navigation, Float Method, Fixed Width (p. 186):
ul#navigation li { width: 100px; /*Set a fixed width on `li` example in Figure 15.4 puts the width on `li a` instead.*/ float: left; /*Float items to the left*/ display: inline; /*Fix a float issue in older IE browsers*/ margin-right: 5px; /*Put some space between items*/ }
- Figure 15.4: Horizontal navigation bar with uniform button widths (p. 187)
- Figure 15.5: Horizontal navigation bar with uniform widths, centered text (p. 187)
Chapter 16: Text Content
Websites
Examples
- Finished Sample Style Guide (p. 190-198, 204)
- Figure 16.6: Setting Arial on the body tag (p. 199)
- Figure 16.7: Line-height inherited in the content division (p. 200)
- Figure 16.8: Line-height difference in the supporting content division (p. 201)
- Figure 16.9: Indenting paragraphs in the content division with the descendant selector (p. 202)
Chapter 17: Page Layout
Websites
- 960 Grid System (Layout approaches)
- 978 Grid System (Layout approaches)
- Quirksmode.org Conditional Comments (Internet Explorer work-arounds)
- CSS Compatibility and Internet Explorer (Internet Explorer work-arounds)
Examples
- Figure 17.1: Illustrative background colors on each major division of the page (p. 206)
- Figure 17.2: Rough mockup of a page (PNG image) (p. 207)
- Figure 17.3: Another mockup, with images that can be used for the actual design (PNG image) (p. 210)
- Figure 17.4: Navigation positioned absolutely over the content, which must be moved out of the way (p. 211)
- Figure 17.5: Content pushed out of the way of navigation; layout begins to develop (p. 212)
- Figure 17.6: Right-hand navigation layout by changing only two styles (p. 212)
- Figure 17.7: Centering the page for all nonpositioned elements (navigation stuck on left) (p. 214)
- Figure 17.8: Centered page with
div#page
as positioning context (navigation fix) (p. 214) - Figure 17.9: Supporting content positioned absolutely; bad positioning context (p. 215)
- Figure 17.10: Supporting content positioned absolute;
div#content
as positioning context (p. 216) - Figure 17.11: Minimum height (
min-height:
) on the main content division (p. 217) - Figure 17.12: Positioned page with branding and navigation styles from previous chapters (p. 218)
- Figure 17.13: Background image to be tiled horizontally on the background of the page (p. 219)
- Figure 17.14: Page design with the background image in Figure 17.13 (p. 220)
- Figure 17.15: Revised layout, placing the supporting content below main (p. 220)
- Figure 17.16: Footer as styled in previous chapters; it looks unfinished (p. 221)
- Figure 17.17: Footer positioned absolutely over tiled background image on
html
(p. 222) - Figure 17.18: The page looks incomplete because of the white area below the footer (p. 223)
- Figure 17.19: Simple background color fix on
html
makes the page look more complete (p. 224)
Chapter 18: Multimedia Content
Downloads and Utilities
- Yahoo! Media Player (Audio player)
- WordPress Audio Player (Audio player)
- 1 Bit Audio Player (Audio player)
- SWFObject (Standards-compliant Flash media loader)
Websites
Examples
- Sample markup for a photo caption with an accessible label (p. 226):
<p class="caption"> <span class="access-label">Photo caption: </span>We took this photograph of the Jefferson Memorial during our visit to Washington, D.C. in November of 2010. </p>
- CSS to hide the access label (p. 227):
.access-label { display: block; /*Display as block for positioning*/ position: absolute; /*Pulll from document flow*/ left: -10000px; /*Move way left of the screen*/ }
- Example reusable markup for creating a consistent image presentation (p. 227-228):
<div class="photograph"> <!--Path to image in src=""; match height and width to image--> <img src="" height="300" width="400" alt="Add alt text" /> <p class="caption"> <span class="access-label">Photo caption: </span> Image description.... </p> </div>
- Figure 18.1: Example presentation of a photograph and caption (p. 229)
Chapter 19: Performance and Interaction
Downloads and Utilities
- jQuery (JavaScript library)
- jQuery Plugins (JavaScript library plugins)
Websites
- jQuery Docs (JavaScript library documentation)
- jQuery API (JavaScript library API documentation)
- MooTools (JavaScript library)
- Prototype (JavaScript library)
- Google Libraries API (Google-hosted libraries)
Examples
- The jQuery Ready Event (p. 237-238):
/*JavaScript*/ $(document).ready(function() { /*Scripts are written here to run once the DOM has been loaded.*/ } );
- “DOM Scripting is Awesome” (p. 238-239):
/*JavaScript*/ $(document).ready(function() { $('div#header h1').html('DOM Scripting Is Awesome!'); } );
- Is JavaScript Available? (p. 239-240):
/*JavaScript*/ $(document).ready(function() { $('body').addClass('hasjs'); } );
/*CSS*/ p { color: black; } body.hasjs p { color: red; } /*As a demonstration, make paragraphs red when JavaScript is active.*/
- Figure 19.1: Layout from Chapter 17 without JavaScript enhancement (p. 241)
rpkwidescreen()
function (p. 240-241)/*JavaScript*/ function rpkwidescreen() { var rpkwidth = $(window).width(); if(rpkwidth>1100) { $('body').addClass('widescreen'); } else { $('body').removeClass('widescreen'); } }
- Figure 19.2: Layout with
widescreen
class and CSS (p. 241-243)/*JavaScript*/ $(document).ready(function() { $('body').addClass('hasjs'); rpkwidescreen(); /*Run once the DOM has loaded*/ $(window).resize(rpkwidescreen); /*Run on any resizing of the browser window*/ } );
/*CSS*/ div#page { width: 700px; } /*Width on small and/or JavaScriptless screens*/ body.widescreen div#page { width: 1000px; } /*Widescreen width*/
- DOM scripting for external links (p. 243-244):
/*JavaScript*/ $(document).ready(function() { $('div#content a[href^=http\\:\\/\\/]').addClass('ext'); } );
/*CSS*/ a { color: blue; } /*Color links blue*/ a.ext { color: red; } /*Color external links red*/
- DOM Scripting and animation (p. 244-246):
/*JavaScript*/ $(document).ready(function() { /*Set margin-right for jQuery manipulation:*/ $('ul#navigation a').css('margin-right','30px'); /*Navigation hover function:*/ $('ul#navigation a').hover( function() { $(this).animate( { "margin-right": 0 } , "slow"); }, function() { $(this).animate( { "margin-right": 30 } , "slow"); } ); });
- DOM Scripting and animation
improved (disable animation queing so
that navigation doesn’t continue to expand and contract again and again; speed up
animation):
/*JavaScript*/ $(document).ready(function() { /*Set margin-right for jQuery manipulation*/ $('ul#navigation a').css('margin-right','30px'); /*Navigation hover function:*/ $('ul#navigation a').hover( function() { $(this).animate( { "margin-right": 0 } , {queue: false, duration: "fast" }); }, function() { $(this).animate( { "margin-right": 30 } , { queue: false, duration: "fast" }); } ); });
Chapter 20: Site Architecture
Downloads and Utilities
- XAMPP for Windows (Development Web server)
- XAMPP for Mac OS X (Development Web server)
Websites
- XAMPP (Development Web server documentation)
Examples
- Setting Up XAMPP (simplified instructions)
Chapter 21: Reusing and Dynamically Generating Content
Websites
- PHP documentation (Language reference)
Chapter 22: Dynamic Sites in WordPress
Downloads and Utilities
- WordPress.org (Blogging software)
Websites
- Open Source Initiative (Open source information)
- WordPress.org (Blogging software)
- Wordpress Codex (WordPress documentation)
Chapter 23: Going Live
Downloads and Utilities
- WinSCP (FTP/SFTP client for Windows)
- Cyberduck (FTP/SFTP client for Mac OS X)
- FileZilla (FTP/SFTP client for all operating systems)
Websites
- no-www.org (Site arguing against www. in Web URLs)
- www.yes-www.org (Site arguing for www. in Web URLs)
Chapter 24: Tracking Visitors, Sharing Content
Downloads and Utilities
- Webalizer (Hosted site statistics)
- ClickHeat (Hosted interaction tracking)
- AddThis (JavaScript-based sharing button)
Websites
- Google Analytics (Remote site statistics)
- Creative Commons (Content licensing)