|
|
||||||||||||||||||||||||||
What is HTML?HTML stands for HyperText Markup Language. The term Markup means HTML is NOT a programming language. This is very good news because it's way, way easier than learning programming, so easy in fact we're going to have your first web page done in about 10 minutes. What is a web page?A web page is simply a text file with some HTML code written inside AND whos filename ends in either .htm or .html eg. myfile.htm. What is a text file?A text file is a very simple document that can be produced with Windows Notepad. Most word processors can also be used providing you choose: save as a text file. Text files often have a file name extention (the bit after the dot) as txt - myfile.txt. So to do the exercises here you'll need to pick a program to work in. I like Notepad if you have Windows coz its simple. (Usually found under Accessories). |
||
|
HTML is made up of code in pointed brackets. These are called tags. The first tag we will learn is the HTML tag. This tag starts each page and ends it telling the computer that between the two tags is HTML code. So open Notepad or your word processor and write an opening and closing HTML tag into your page. Note that the end ending tag has a forward slash / before the letters HTML. This forward slash is in all closing tags in HTML. |
<html>
|
|
Each web page has two distinct sections, the head section at the top and body section below. The body section is where everything you can see on the page is such as text, pictures, links etc. The head section is for other stuff such as key words for search engines. We'll learn about the head section later. Meanwhile here are the tags for head and body sections. Easy to remember as you can see: |
<html>
|
|
Now all we have to do is bung some text into your web page. Make sure you put the text between the body tags - in the body section of the document. Save your file giving it the extention (the bit after the dot) htm or html: myfile.htm Now the moment of truth. You want to see your new web page as it will be displayed on the web. Find the new file you've created and open it in your web browser (that's Internet Explorer or Netscape most probably). You may just have to double click it, or drag it on to the browser window. And that should be it, your first web page. Told you it was easy. |
<html>
|
Should I use capitals only?No, it doesnt matter if you caps or lower case for HTML code. But it makes neater and clearer if you stick to some kind of system. Also it doesn't matter how much space is in between your code. You can put code on different lines or right next to the text if you want - whatever seems neater. Youve done all it wrong!What youve just done should display in youre browser window but technically its wrong. Try putting a load of text in there and then see what happens. Youll find that no matter how hard you try all the text comes out in one big chunk - no paragraphs, no more than one space between each word. In addition its not proper like. Technically everything on an HTML page should appear in an element. Whats an element? How can you sort your text into paragraphs? These questions and more will be answered in the next thrilling episode of Stevethe Pro teaches HTML 4. Meanwhile lets recap... |
||
![]() |
||