Web Design Tutorial - Lesson 1, Part 3

Lesson 1, Part 3

At the end of Lesson 1, Part 2, I had you open the source code for that page. If you still have it open, that’s great. If not, you can just open this post’s code. For our purposes, which page you use won’t make a difference.

Tag! You’re it!

As I mentioned in the previous section, commands in HTML are known as tags. These tags are what allow the browser to understand what you want it to do.

Let’s take a look at the second line of the source code. It reads like so:

<html xmlns="http://www.w3.org/1999/xhtml">

For now we’ll ignore the xmlns=”blahblahblahyadayadayada” part. That part comes later, and has to do with the details of creating valid XHTML documents.

So, what we’re left with is <html>. And so we arrive at the most basic tag in HTML. It tells the browser that what it’s about to read is an HTML document. Every HTML document must have an <html> tag in it.

Now that we know that this is a tag, what’s the main thing that stands out about it? Don’t tell me it’s the color; that’s arbitrary, based on what program you’re viewing the code in. It should be the triangular brackets, which (unless you do some other form of coding, or type math, or draw emoticons like >.>) you’ve probably never even used on your keyboard before. Every tag begins with a left angle bracket (< - also known as a “less-than sign”), and ends with a right angle bracket (> - also known as a “greater-than sign”).

Now let’s skip down to the very bottom, to the very last tag on the page. Whoa! It’s another one! Where are they coming from?!

Actually, in a way, it’s the same html tag that you saw at the top of the page. You see, most tags, with a few exceptions, have a start and an end version of themselves. Why? Well, let’s say you use a tag that lets you write a paragraph. If you just put the appropriate tag at the beginning of the paragraph, how will the browser know when the paragraph ends? For this reason, there exist closing tags. If you look closely you’ll notice that the html tag at the bottom of the page has a forward slash (/) right after the left angle bracket (<). This means that it is a closing tag.

Aaaaaaand… Voilà! Just like that you have a basic understanding of the inner workings of HTML. Simple, isn’t it? From here on out it’s just a matter of learning the different tags and when/where to use them.

Enjoyed the lesson? Keep your eyes open for Part 4.
Subscribe to my RSS feed to get updates in your favorite RSS reader, or subscribe by E-mail!

<< Go back to Lesson 1, Part 2   Table of Contents   Continue on to Lesson 1, Part 4 >>

Leave a Reply