A few years ago I spent some time teaching Web design at Kendall College of Art & Design. This is a rough transcript of the lecture I used on the first day of each semester. It was designed to give a brief overview of the technologies, introduce some new concepts to the students, and scare as many as possible into dropping the class…
Hello. My name is John Winkelman, and I will be your instructor for this semester of Web I, Intro to Web Design.
Web design covers a lot of ground. There is the “look and feel” — what you see when you browse to a website. There is the underlying code that goes into the creation of a site. There is the collection of assets — photos, graphics, audio and video — all of which are part and parcel of a site. And there are the research and exploration that go into creating the overall user experience.
We have limited amounts of time and resources in this [as for most projects]. So we will focus on some of the simple aspects of Web design, diving as deeply as possible into the basics of writing the code that underlies every page on the Internet. We will focus on how to design websites, and in order to do so effectively, you will need to know what is possible and what is reasonable.
Roughly, the creation of a website can be broken into two parts: The visual design and the structure of the data. Or, information and the presentation of information. If this were bookbinding, the data would be the story and the presentation would be the physical parts of the book and the design choices such as typeface, cover design, type of paper and the like.
[At this point I pull up Google on the overhead projector.]
All of you have seen this page. You will probably be using it quite a lot over the course of this semester. This is about as simple as a Web page gets while still being useful. You are looking at the presentation of the page. This (here I “view page source” on the page) is the structure of the page. Not so simple, is it? Sometimes it takes a lot of work to make something elegant.
Okay. Let’s look at something a little more complicated (CNN.com). There is a lot going on in this page… (view page source) and the underlying structure of the page reflects that complexity.
Still awake? Good.
Here is another example, something I whipped up to be an easier introduction (a page where I have created an HTML version of the book The Adventures of Tom Sawyer).
Okay. This is about as simple as a content-heavy page gets. This is a novel, which means it has a title, subtitle, author information, chapter headers, and paragraphs. Simple, straightforward, and no real surprises. Look at the first few lines of text. Now, let’s look at the structure of this document (view page source).
Right up at the top, there are the same words, except they have a little extra around each chunk of text, which looks like this:
<p>the text</p>
Now is a good time to explain the first of two new languages you will learn in this class: HTML, which stands for HyperText Markup Language. Basically, this is a way of describing a chunk of content in such a way that it has logical structure. Hyper text. Text which describes text. This is necessary because we need to be able to control the structure of a document in order to be able to control the way it looks in a Web browser. In order to do this, there is another language — CSS, or Cascading Style Sheets — which we use to control the presentation of documents which we structure using HTML.
There is a third language which Web pages use to allow and control user interaction and manipulation of a document — JavaScript, which is often referred to in the shortened form “js.”
So… three languages. One for structure, one for presentation and one for interaction. Things, descriptions and uses. Nouns, adjectives and verbs. In this class we will be using only the first two. First, let’s talk about HTML…
Please stop crying. We still have a lot to cover today.
The first and primary use of a Web page is to display content of some kind. It doesn’t matter what this content is. It could be a photo gallery, a concert promo, a blog, a store or a corporate site. It could be simply text, like the Tom Sawyer example. It could be a Web-based game, like those found at Orisinal or Kongregate. It could be a movie appreciation site. It could be in English, Japanese, Arabic, Russian or French or all of these languages. Or it could be any combination of these. No matter what is presented to the user, under the hood the structure is fundamentally the same. HTML is HTML is HTML. At the base level, every web page in the world is created using the same tool set. And that is another way of thinking about HTML — it is a set of tools you use to build things. I guess in that sense, it kind of makes this class more of an apprenticeship.
Every chunk of content that you want to display on a website is one of a limited number of possibilities: A headline. A paragraph. A link. An image. A table. A list. Because it is a language, HTML has several layers of interpretation. It has syntax, which is the words available for use, and it has semantics, which is the way in which the words are used. Syntax and semantics. Describing things, and placing them in context with one another.
There are around 85 words in the HTML language, and they conform, more or less, with the uses to which they are meant to be put. For example:
<p></p> - Paragraph
<b></b> - bold text
<i></i> - italic text
<ol></ol> - ordered list
<table></table> - tabular data
<html></html> - an HTML document
(A list of all available words can be found here.)
Out of these words, you will probably use about twenty of them this semester. Notice that these words come in pairs, each half of the pair surrounded by angle brackets. Taken together, they are called “tags” or “elements” or “nodes.” Using these tags, we mark up a document to give it structure and meaning. Look at this example in a browser…
(The poem “The Raven.”)
In a browser, it is all jumbled together. No line breaks, no formatting of any kind. Just one big, long, run-on sentence. Now, we add a couple of tags to give this semantic meaning.
(A piece of “The Raven” with minimal HTML included: <p> tags around the stanzas.)
Now it looks a little better, doesn’t it? The stanzas are broken out. We have provided a little structure. We have given the distinct pieces of this poem meaning.
(Add headline tags around title and author.)
Now things are looking a even better. The title-level pieces of the document are called out as distinct units of information. Now let’s go one step further and add some line breaks to the ends of the lines.
(Add BR tags.)
Now it looks like a poem! All the lines break where they should. The title or headline and subtitle or subhead are obvious. The content has been structured so that it retains its original meaning. When the browser looks at a text document, it doesn’t automatically know what all the pieces and parts are. We have to tell it what they are.
Notice that other than adding those HTML elements to the document, I didn’t change how it was laid out. The breaks we put in aren’t necessarily part of the presentation of the document. The structure of a poem requires that lines end after specific words. Therefore the line breaks are part of the content.
Looking at this document with a Web browser, we can see the structure of the document. We have done nothing to say how it is to be presented. In order to do so, we need to use another language: CSS, also called Cascading Style Sheets, or simply stylesheets. We will learn about those after the break.
Any questions? No? Y’all already know everything there is to know about building websites? Good. My work here is complete.
To their credit, none of my students ever dropped the class because of this lecture.