Web pages are primarily built with a code language called HTML. It stands for HyperText Markup Language. It's a set of instructions for your browser that dictates what should be displayed on the page, how, and where. Most websites now also use client and server scripting languages, but that goes beyond the scope of this guide, and fortunately, you don't need to learn it to start building your very own web pages. In fact, you can see the code that builds some of your favorite websites right now. You won't see most of the scripting code that runs on the website's location, but you can see the HTML that website sends to your browser to tell it how to display the page. This first exercise may seem a little daunting, but don't worry, you won't have to understand what all this code does yet. I would just like to show you an example.
- Open a new window or tab in your browser.
- Go to a page you're familiar with.
- Right click somewhere on the text in that page
- click the option that says 'view source'
- Briefly look through the text
Don't Panic! Remember, I said you wouldn't have to understand what all that mumbo-jumbo technobabble looking code does, I just wanted you to get a glimpse of what your browser reads to display a web-page. If you continue pursuing your knowledge for HTML, you will understand all that code. But for this guide, we're keeping things simple here, so what you will learn here isn't going to be very complex.
Even with simple practice with HTML, like everything else new there is a learning curve. If you don't understand or get it right at first, it's ok. Keep practicing and you'll understand it faster than you might think. To learn HTML, we use the same learning process we use to learn most new skills:
- Trial
- Error
- Bang your head into the keyboard
- Obscene swearing
- Repeat until you get it right
Web pages are built out of building blocks called "Tags". Tags are enclosed between '<' and '>' symbols. When your browser sees text wrapped up in these symbols, it knows it's a tag and treats it according to what kind of tag it is. You remember playing with building blocks when you were little (or maybe you still do, and that's ok) right? Well just think about building a page out of HTML tags like building something out of blocks. You just have to put the right blocks together in the right order to build what you want. The big exception here is that we'll be building from the top down instead of bottom up.
Before we dive in to writing tags and seeing what they all do, Let's take a look at what makes up a web page.
- Header - Tells the browser information about the page.
- Body - What you see displayed on the page
<head>
<title>WebPage Title</title>
</head>
<body>
<p>This is the website text!</p>
</body>
</html>
Can you see how all of these tags work together to make a simple web page? Also note that these tags have opening and closing tags. The closing tag starts with '/' and tells the browser that tag and everything in it has ended. By looking at where the opening tags are and their corresponding closing tags, you can see the main blocks of the web page. Can you pick out where the head and body sections begin and end?
Ok that's pretty simple so far right? We'll talk about a few specific HTML tags in the next post, and give you some practice writing your own.
Thanks for reading and Stay tuned for more!
No comments:
Post a Comment