[This article first appeared on MWEB iTutor]
DIY HTML - Part 1
Page 3, Why did it do that?
When you were a kid you never stopped buggin' your folks, why does it do that? Where do I come from? I will not eat that. Well I'll let you in on a secret: the best web designers are kids at heart (or they're still kids!).
What you should start asking is why?
Why does my page look the way it does? If you look a little closer at your web page you'll see that all sorts of things are going on without you even noticing. Like the fact that the text on your page is black and the background is white. Why not blue, yellow or red? You never told the browser to do that.
The reason is something called "defaults". When a browser reads your HTML code it waits for instructions (from your tags) as to how it must represent your data on the web page. When too little information is given the browser will show the information using it's "default settings".
In our case when we placed our sentence between the <body> tags the browser was waiting for information about how to represent that sentence on the page but we never told the browser enough. So the browser used it's defaults: it chose white as the background colour, black for the text colour and it put the sentence in the top left of the page.
There's more though. It also chose the size of the text, the text style (it's using the font "Times New Roman") and the space between letters.
This is all good. It means that you have the freedom to manipulate the way things look on the page. It means that you can start designing.
If you began by asking why? Then the next question should be how? And that's the next tutorial...
"But why?" they scream, "why?".