This gives you a much greater range of possible colours, but is not easy to use unless you are comfortable with hexadecimal numbers.
(Some of the digits are letters rather than numerals because base 16 requires more numerals than base 10, so is written 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 etc, with "10" being equal to 16, "11" to 17 and so on - bet you're sorry you asked). All colours on a screen are made up of a mixture of red, blue and green : the first two digits are the amount of red, the next two the amount of green, and the last two the amount of blue. If you are feeling more adventurous, you can replace the n with a # followed by a six digit hexadecimal (base 16) number, something like this, (which produces this colour). Like with FONT SIZE, you turn it off with a simple. The quote marks are optional, and it recognises the names of most common colours (if you want to use grey, spell it "gray").
The easiest way to use it is to put in the name of a colour, so turns text blue, makes it green and so on. The tag is (note the spelling - "colour" won't work), where n can be several things. But it's more likely to look the way you intended on a visitor's browser if you use it the way it was designed to be used.Īnother thing you can do with the tag is change the text color, as I just did there. That does in fact work for some browsers : the very first webpages I created I did exactly that, because I didn't know what I was doing. It may have occurred to you that you could perhaps change the font size by just putting, blah blah, bigger blah and so forth throughout your webpage, never using at all. I like big writing, it's easier to read, especially if there is a lot of it. Why do I do this, when I just implied that fiddling with the font size is not necessarily a good idea? Well, it amounts to : "it's my website and I'll do what I want", to be honest. works exactly like except that it doesn't have an "off" tag, and you only use it once per page. changes the default font size from 3 to 4. I think size three often looks a little small at the default setting, so on most pages (including these) I use a cousin of, , right at the beginning of the section. If you don't specify a font size at all, your text will be size 3. For example, a size 1 sentence might look OK on your machine, yet be so small you can't read it on someone else's. Exactly how big a particular font size will display on someone else's screen depends on all sorts of factors over which you have no control, mostly how their browser and computer are set up. Why is this better? It's this matter of different browsers displaying things differently again. +2 makes it two sizes bigger, -1 makes it one size smaller, and so on. Marvellous.Ī better way to use the SIZE attribute is to put +1, +2, -1 or -2 instead of the number, like this, which makes the text one size bigger, and again is turned off with. With the glorious logic that so often afflicts computer systems, these numbers work exactly the opposite way round to the numbers used in creating headings (, and so on): that is, size one is teeny and size seven is huge. The text will change to the size you specify, until you turn the effect off again with the tag.
You can change the size of your text at any point by putting in a tag like this :, where n is a number between 1 and 7. (Incidentally, if you're wondering where the word font comes from, it's an old word for typeface). Unlike other tags that we have looked at which use attributes, you have to use an attribute with - on its own it doesn't do anything at all. One of your most powerful weapons for jazzing up your text is the tag and its SIZE, COLOR and FACE attributes. HTML for Absolute Beginners, by Jon Storm. Absolute Beginner's HTML - text size, colours and fonts