HTML for beginners The html language uses what we call "tags". Tags serve different purposes. Each one will be explained as we come to it. All tags are placed between the < and > characters.
We will start with the tags that "EVERY" html page must have....
<html> You will notice the tags are in pairs, one without, and one with the /. The / is called a closing tag to tell the browser that we are finished with the function of that tag. Nearly all tags used require closing tags. There is a new coding language on the market that we call xml and xhtml which has much stricter requirements including closing tags for EVERY opening tag, but until you finish these lessons, don't even think about it.
Html browsers don't care if you type your tags in UPPERCASE, lowercase, or BotH, but the new language REQUIRES lower case, so it's best to start right now with the habit of always using lower case tags. Copy the above code into notepad and save it as "index.html", then go to wherever you saved it and launch it by double-clicking or single-clicking, depending how your system is set up. You will see a blank page. Don't worry, it worked. We just don't have anything in the body of our page yet. We called it index.html because with most websites, this is the name of the first page we see. It's usually what is called the "default" page. That means if someone typed www.awebsite.com without following it with a page name, they will usually see the index.html page. Save this file for future use because throughout the lessons we will be constantly adding to it to teach you newer tags. If you highlighted the text above and used copy and paste to put it in notepad, you will probably find that every line after the first is indented. That's because I'm using a table here so the text doesn't go right to the edge of the screen. Some browsers will cause indenting and some won't. Don't worry about it. You can remove the indents or leave them. Either way works. Later on we will start worrying about layout, and then you will want to remove the indents. |
Premier Website Solutions |
Tell a friend about this site.
This website is designed and hosted by Premier Website Solutions |