| Index | Basics | Colors | Fonts | Images | Links | Tables |
"HTML" or "HTML Source Code" is simply the instrunctions that the browser reads and interprets into the pages You view on the internet (or on Your computer). Although most browsers work basically the same way, some display tags in different ways and this will cause pages to look different in different browsers. There are many different ways of using HTML code including compiling it (compressing it for a smaller size) but I will only be explaining the code in ASCII (text) format. "Source Code" is a term commonly used by computer programmers to mean the source of a program, but in this case the source code is the HTML used for a page. | |
The best thing about HTML is that You can look directly at the HTML code that makes the web page possible. So if You see something You really like on a Web page You can view the source code and put the same ideas to work. To do that You can "View Source", when You click it a "Notepad" window should open (Netscape has it's own viewer) showing You a bunch of text (HTML code) that Your browser reads to display the pages properly. You will find the "View Source" selection in different places on different browsers, but in Internet Explorer 4 You can click the "View" menu and select "Source" this will show the source code easily, or You may also right click on the page itself (not on a link and not on a pic) and select "View Source". | |
Please do NOT copy someone's work ! People work very hard to create web pages and no-one likes to have something stolen from them. If You see something You like borrow their idea to build on Your own ideas. I like to copy the code to my hard drive and then experiment with altering the original, then after understanding how the ideas work I start out writing my own code, deleting the original after I have my own working code. | |
One mistake that people make at first is thinking that the HTML code must be all caps, this is not true at all. HTML code can be written in upper or lower case and it still works the same. I use lower case most of the time, not that I really try to, it just seems easier to me. I think people use upper case more often because it's easier to spot the HTML code when it is in with alot of other text maybe ? In my examples I will try and use only upper case tags so You can spot them easier. | |
When You look at this "HTML Code" You will see lots of "Tags" and tags are what make up the HTML language all of the tags You will be using at first are all inside of the <> greater than/less than (also called angle brackets). Some tags have what are called parameters, they are words that define a tag, for example the <FONT> tag uses several parameters like what type of font, it's size, it's color, etc. these parameters usually equal something. To use these parameters they are included into the font tag like this: | |
| |
The first tag You normally see when You view the source code is the <HTML> tag, this tells the browser that it is a HTML file and to read it as HTML, most browsers today know that if the file ends with .htm or .html it is a HTML file and it reads it as HTML (some older browsers may not, so You need to use it). This tag has an Open & Close tag meaning a start and finishing tag, what this means is when You use an Open & Close tag You must also end it... To do this You just add a slash in front of the HTML like this </HTML>. The </HTML> goes in at the end (or bottom) of the HTML page so that everything between the Open & close tags are considered html.<HTML>the HTML Code is in here</HTML> | |
After the <HTML> tag the next tag is the <HEAD> (header) tag this tag contains a little info about the page and how it's read, mainly the title of the page is located there. it also has an open and close tag <HEAD> </HEAD> and if there was anything on this web page to be displayed it would need to be located inside the <BODY> tag, this is where the main contents of the web page would be loacated. It is also an Open & Close tag. | |
To make the code or sections of code easier to find You can add comments to the HTML code without it appearing anywhere on the page. To insert comments in Your work You can use " <!-- Your Notes / Comments here -->", everything between the <!-- and the --> will be considered comments and will be ignored by the browser.
| |
Below is the code for a very basic page: italic text is explaining the line | |
|