Warning: This is an archived course website that is part of my teaching portfolio, so some links may no longer work. Please contact me with any questions about this site.

Code Bank

The Code Bank will serve as a repository of code snippets that you can copy and paste as you build your websites for this class. Although your writing and design work in this class must be original, the basic building blocks of (X)HTML and CSS are well established and don’t need to be typed out by hand each time you create a new site.

Think of the items in the Code Bank as blank templates–they provide a starting point for your work, but they must be customized and fine tuned if you want to create successful websites.

To use the code snippets, simply copy and paste the code from the samples into a text editor like TextWrangler (Mac) or NotePad++ (PC).

Items will be added to the Code Bank as we progress through the semester.

Basic Page Structure

At minimum, an HTML page should contain the following items:

<html>
<head>
<title>Title goes here...</title>
</head>
<body>Body goes here...</body>
</html>

Document Type Definitions

Most browsers can display simple webpages without document type definitions (DTDs), but if you want to retain control over how browsers interpret the code of your complex websites, you need to tell the browsers what kind of (X)HTML you are using. Document Type Definitions appear at the very top of your (X)HTML pages and instruct the browser how to display the rest of the code in that page. W3 Schools has a more thorough explanation of DTDs, but in this class we will primarily use two DTDs:

XHTML 1.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

XHTML 1.0 Transitional

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Note that the final line of each of these DTDs is actually the opening <html> tag. When using an XHTML DTD, you should also use a namespace declaration, which doubles as the opening <html> tag.

Linking to an External Style Sheet

In the <head> section of your (X)HTML page, insert the following code, replacing “stylesheet.css” with the name of your style sheet:

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

Style Sheet Test

When you want to test how comprehensive a style sheet is, it can be helpful to have a page that uses most of the standard (X)HTML elements. You can copy and paste the code from Style Sheet Test page into your site to see how your CSS file styles the standard elements.

Where am I?
This is the class website for English 4814: Writing for the Web, taught by Quinn Warnick at Virginia Tech in fall 2012.
Worthwhile Reading
The links below are the most recent additions to my collection of bookmarks that are relevant to this course. You can find a complete list of ENGL 4814 bookmarks on Pinboard.

  • CodePen
    Awesome browser-based tool for experimenting with HTML, CSS, and Javascript.
  • What Constitutes Good and Bad Web Design?
    NY Times: "Shoddy Web site design is a curse of modern life. The more dependent we have become on the Internet for information, the likelier we are to suffer from its design deficiencies. Bad design can be infuriating, inconvenient or damaging in any field. But it is especially frustrating in areas like this where many of us find the technology so inscrutable that we tend to blame ourselves for being baffled, because we feel unable to judge whether the design is at fault."
  • wireframe.cc
    Free, minimalist wireframing tool, with templates for desktop, tablet, and phone.
  • Yes, learn basic programming
    Derek Sivers thinks everyone should learn HTML, CSS, and Javascript: "If you heard someone say, 'I have this idea for a song. But I’m not musical, so I need to find someone who will write, perform, and record it for me.' - you’d probably advise them to just take some time to sit down with a guitar or piano and learn enough to turn their ideas into reality."
  • CSS Floats 101
    Another great article from Noah Stokes in A List Apart. This one focuses specifically on one of the trickiest parts of CSS for beginners to master: the float property.
  • CSS Positioning 101
    Noah Stokes's A List Apart article is a great starting point for getting better at CSS positioning. Complete with several examples.
  • Modular Scale
    Handy tool for improving typography on modern, responsive websites. (The linked articles on this page are important, too.)
  • Interactive Guide to Blog Typography
    Great tutorial for improving typography on any website, not just a blog.
  • The Basement
    Great photo essay by Cabel Sasser: "And eventually, you crawl behind a corner, and discover a bundle of conduit. Conduit for every major internet carrier you’ve ever heard of. Oh, right. You had almost forgotten. This building, this basement, is the major internet hub for the entire region."
  • Snow Fall: The Avalanche at Tunnel Creek
    Beautiful interface for this NY Times article. Perfect integration of video, images, and text.
  • Service Learning Survey
    Students: If you worked with a client from the VT Engage program, please take a few minutes to provide the program with some feedback about your experience.
  • SPOT Survey - Fall 2012
    Students: If you haven't completed the SPOT evaluation for this course, please do so during class on Wednesday. I take this feedback very seriously, and I use it to revise my classes each semester, so please be specific about the aspects of the course (and my teaching) that you found successful and unsuccessful.
  • Standards, not Prescriptions
    Nathan C. Ford: "For standardization to truly continue making the web a more stable place, we do not need more anticipatory specifications, we need solutions. Lots of them. Dumb ones, fat ones, smart ones, skinny ones. Let us embrace them all then watch them fight it out in the field. When the strongest emerge, we can adopt them into our specs and wait for the next batch of victors."
  • Into the vault: the operation to rescue Manhattan's drowned internet
    Dante D'Orazio, writing for the Verge: "Hurricane Sandy's storm surge flooded Verizon's downtown office, rendering miles of copper wiring useless."
  • Responsive Design Testing
    Great little tool for seeing what your website looks like at a variety of screen resolutions.
  • Having a Mobile Strategy is Like Having a Laptop Strategy 20 Years Ago
    John Steinberg: "I do not want to download your app. I just want to read the content on the mobile web and possibly share it if I’m engaged. The constant knee-jerk interstitialing of full-screen app download messages every time I load sites is beyond frustrating. Many site owners seems convinced that this frustration, which no doubt dampens the velocity and volume of content sharing, will convert in loyal downloading app users."
  • Google Data Centers
    Photos, video, and history of Google's physical facilities. Obviously one-sided, but interesting nonetheless.
  • Google Throws Open Doors to Its Top-Secret Data Center
    Steven Levy, in Wired: "This is what makes Google Google: its physical network, its thousands of fiber miles, and those many thousands of servers that, in aggregate, add up to the mother of all clouds."
  • Guidelines, Tools and Resources For Web Wireframing
    A nice list of resources about wireframing.
  • Save For Later
    Fascinating report on a Mozilla UX project by Brian Groudan: "All browsers support two functions: searching and revisiting. My research questions whether constructs like bookmarks really are the right model to support revisiting. I worked closely with Mozilla user experience researchers and designers to rethink how Firefox can better offer 'save for later' in the browser."