What ideas did you have for labeling the colors above? A natural first step would be to use names like yellow or blue. HTML (and in most cases, computers in general) use a method called RGB for labeling colors. RGB stands for Red, Green, and Blue. These are three primary colors in the sense that they're primary for what human eyes respond to. These colors make up a good basis for the wavelengths of light that the photoreceptor cells in our eyes react to. So your computer monitor presents different colors by adding in different amounts of red, green, and blue to cause your eye to interpret it as a single color.
So how do the numbers get involved? We use 3 numbers to represent the intensities of the 3 different colors.
Specifically, an RGB number would look like this: #ef0023
which creates a color like: .
In class I'll cover some methods for putting color into webpages with just HTML. Basically, it can be done with attributes like bgcolor, text, and background for putting in background colors, changing the color of text, and putting in background images, respectively. I'll also show how to use the <font> tag for changing the font size and style (done with the size and face tags). Then we'll (hopefully) notice why a better method for handling presentation might be needed.
This will just be, again, in-class demonstrations of putting an HTML webpage together, while noting some things to make it easier to get certain parts done right. In particular we'll review tables, images, and any other HTML aspects that you have questions about. This will also probably include a couple statements about how whitespace in your HTML code is interpreted and the difference between (and purpose of) the head and body HTML elements.
There's a difference between linking locally and globally. For global addresses we'll use the typical http urls that you're used to seeing. (Note that two other major types you'll come across are https and file.) For local addresses we're stating where a file is located relative to where our .html file is located. We'll go over what those path names mean and see how you can give a file path (local address) from where your .html file is to anywhere on your computer.
Most of the time you'll want to link to files that are held locally for your website. Mainly that's to improve download times of your webpage. Also, we'll see how to use the id attribute to link to specific sections of your webpage.
Web browsers will always try to interpret your code as well as they can. Still, writing "correct" HTML (at least, according to the best known rules) will help your webpage behave like you expected as often as possible.
We'll get a quick introduction to this today. The main example and discussion will come on Monday.