Thursday 21 February 2013

Making a web page 01: It's a tree!

#2 son asked about teaching him how to make a webpage again today...

I've a tendency to get rather excited so thought that rather than put him off with my enthusiasm I'd take it nice and slow. This, then, is a very gentle introduction to making a web page - I hope it'll form part of a series of posts.

You're looking at this text which is contained within a webpage which might be part of a website and your looking at it through a browser. The browser isn't the internet, the browser is merely a way of accessing a subset of the information which is available on the internet and which is formatted in a certain way. It's formatted using a markup language that the browser can understand called HTML. That's not to say that HTML (HyperText Markup Language) isn't utterly brilliant (it is) but it's not all that the internet is for. It is what an awful lot of it is used for these days but it isn't the only thing out there.

As you now know you're viewing HTML though a browser let me blow your mind by saying that the page you're on now is seen, by me at least, as a tree! Each paragraph you've seen is a leaf on that tree, the picture of a tree above is also a part of the tree. I like trees!

Whilst it might be hard to see the page you're looking at as a tree think about the books on your shelves, they - at the most basic - are also trees. That there stuff you put in your car in order to make it go (no, not parents) is - at the most basic level - dead dinosaurs!

I might be taking the analogy a little far but you get the idea?

Anyway. The trunk of the tree that is this web page is called (have you guessed it yet?) the html tag (we call the parts of the trees tags a lot of the time, but they can also be called elements). It's getting on for being the most important part of a web page but also the part that is most often ignored (Even browsers ignore it sometimes). There are only two branches coming from the trunk but everything else hangs from those two branches.

Here I'm going to mix metaphors a little and tell you that these first two tags/elements are called the head and the body. A human is made up of much the same two things, as I guess the following picture illustrates:

See you again soon.

No comments:

Post a Comment