Are you feeling a bit lost when someone mentions those four letters, “HTML”? Well it is actually very easy to learn and understand. We will cover how to set up a simple page, how to format text, insert images, and insert links. Lets start by explaining what it is exactly.
When you visit a page, you see columns, images, links and different colours. This has all been written by someone (or someone used a program to write it). And it is written in HTML. All web pages are sent to your browser (such as “Internet Explorer” or “Firefox”) as HTML.
HTML is the easiest “computer language” to learn. Now, when you write a formal letter to someone, there are things you add at the start and end aren’t there (such as at the start their address, the date, and at the end your name and signature). Between these items you write the body of the letter. Well, in some ways, the basics of HTML is very similar.
Let me just give you an example of a simple page. This would display the words “Welcome” in the browser (the numbers in bold are not part of the code – they are just line numbers so we know what we are talking about later on).
All tags start and end. A start tag looks like and and ending tag for it would look like . There are many tags – … for underline, … for bold etc.
If we go back to the letter example, you normally write your address, the date, their address etc at the top. Well this is what the first four lines are like. The first line, (note, in html, it doesn’t normally matter if it is upper or lower case. In some technologies such as xhtml it does, but for now it doesn’t matter) just declares that between that html “tag” as it is known, and the ending html tag on line 9 (notice the back slash, indicating it has ended) it has html within it.
The head contains information that isn’t directly displayed by your browser. The
<p>You should put all your content within the <body> tag that you want the user to see inside the main part of their browser.</p>
<p><b>To do links</b><br />
A link is something that lets you click on it, and it will request a new page. You use the anchor tag for this:</p>
<p><a href=”http://www.techneek.co.uk”>CLICK HERE </a></p>
<p>Do you see how that would work? It would display the words “CLICK HERE”, and that links to http://www.techneek.co.uk. This tag, the <a … > tag has an example of an attribute to it – the href. </p>
<p>Almost all attributes have a =” “. It is basically like saying, I have an anchor tag. I want to make it link to something. To tell it to link to something, you need to put href=”yourlink”. Remember when ending this tag (</a>), you don’t need to put in the href. It is always just </a>.</p>
<p><b>Bold, Italic, Underline</b></p>
<p>These are really simple – you probably already know them. <b> bold text </b> for bold, <u> underline </u> or <i> italic </i></p>
<p><b>Spaces in HTML</b><br />
Spaces to some extent don’t matter. I could write this line:<br />
<a href=”http://www.example.com”>example.com</a><br />
<a href=”http://www.techneek.co.uk”><br />
example link<br />
<p>In HTML, any multiplies of a space – ‘ ‘ just show up as one. To display more than one you need to type .</p>
<p>Images are really simple. It is just <img src=”yourimagelink”>. You don’t even need an ending tag (no </img> tag!). If you want to specify the height/width, use height=”120” width=”400”;<br />
<img src=”yourimagelink.jpg” height=”99” width=”89”></p>
<p>Incase the image can’t be loaded for yoru user, you should give an alternative text. This is also good for people who find it hard to see on the screen. To do this, add alt=”a description of your image”. I would personally recommend no more than 6 words.</p>
<p><img src=”youimagelink.jpg” width=”200” height=”100” alt=”View of a beach”></p>
<p>It is recommended that the only image types you use are Gifs (.gif), Jpegs (.jpg), or Portable Network Graphic (.png). Try and keep the file sizes down, some users are on very slow speeds.</p>
<p>So there you are, you should be able to make a page now. Open up notepad, paste this template in:<br />
<title>Your first webpage
Your content goes here, such as Computer Techneek!
And replace the “…” bits with your content. Save it as a .htm or .html file (it makes no difference what you choose) and open it in your browser.
Here is an example simple web page using everything we have covererd so far:
Now you are ready to go further. I recommend that you search for things on your favourite search engine, such as:
paragraph HTML tag
hr html tag
Center html tag
basic CSS tutorial
uploading webpage OR website tutorial server
Ashley Baker is the owner of TechNeek – a computer hardware component news and reviews site. If you need a review of a computer related matter, get down to http://www.techneek.co.uk!