PDA

View Full Version : {Tut} HTML Basics Part 1 & Part 2 {Tut}



Drugs
08-08-2006, 02:08 PM
HTML Basics - Written By Ryan

HTML stands for Hyper Text Mark-Up Language and was the first server side scripting code for the internet. When the internet was first developed websites were made up so simply it was just plain text and images, now we have PHP Scripts, Visual Basics, Forums and all sorts of new things to add to our site.

Anyway, the most known HTML tag is probably <html> which you must put at the beginning of your site to make the internet browser understand it and display the webpage. Normally, straight after the <html> tag goes the <head> tag which is there to use for some codes, for example CSS and some Javascript, within the <head> tag goes the <title> tag which when typed into like this '<title>YourSiteName </title>' will display YourSiteName on the bar at the top of the screen where it normally says the name of the internet browser. As you will see after we have typed in the site name after the <title> tag, we have put in a <title> end tag, when you have finished using a certain tag, for example <html> you will put the tag again, but with a '/' directly after the '<' character. So now we have;

<html>
<head>
<title>YourSiteHere</title>

We still have quite a way to go, because now we have finished using the <head > tag so we will need to close it by putting in a <head> tag with a '/' after the '<' so we now have;

<html>
<head>
<title>YourSiteHere<title>
</head>

If you just used that as a web page, there would be nothing! So lets make the content! The tag for this is <body> and you will put the content after this, obviously after you have typed out the content you will need to end the <body> tag by inserting </body> which makes the code so far look like this;

<html>
<head>
<title>YourSiteHere<title>
</head>
<body>
Welcome to my website!
</body>

But still, that isn't completed as you haven't ended the <html> tag! So all you need to do now to make a simple web page complete is put in </html> so it should look like this;

<html>
<head>
<title>YourSiteHere<title>
</head>
<body>
Welcome to my website!
</body>
</html>

So that's your basic website done, this is what it would look like when displayed on the web;

Welcome to my website!

Although, you must agree it does look rather boring so lets add some colour to it! To start with, lets add a background colour, to make the background a different colour, instead of just having the <body> tag you would have it as <body bgcolor="colourhere"> but where colour here is, you would insert a colour, you can use basic colours like <body bgcolor="blue"> or <body bgcolor="red"> which would just make the background a standard blue or red, or whatever other colour you choose. When you understand how to make the background colours different colours using for example 'red' or 'blue' you could go on to using hex codes, which has hundreds of colours, so instead of <body bgcolor="blue"> you would have <body bgcolor="#FFCC00"> which would display a shade of purple, you can find a list of hex codes by searching for 'Hex Codes' on a search engine [www.google.com] for example.

So if you use a background colour, you would have the following code, and as you can see, we don't make the closing tab for <body> into </body bgcolor> we just keep it as </body>

<html>
<head>
<title>YourSiteHere<title>
</head>
<body bgcolor='colourhere'>
Welcome to my website!
</body>
</html>

Now to make the text look better, normally text will be displayed in the default font 'Times New Roman' but we could change that buy simply putting this tag;

<font face='verdana'> Text Here </font>

That would display the text in the Verdana font, now to make it differant sizes you would do this;

<font face='verdana' font size='1'> Text Here </font>

And as you can see, we still only need the one </font> tag. If you want to make your text a differant colour, you can use the following tg, which is similar to the background colour tag;

<font face='verdana' font size='1' font color='colourhere'> Text Here </font>

One again you only need the one </font> tag and you can use a basic colour, I.E. 'Blue' or a hex code, I.E. '#FFCC00'! So the web page script now should look more like this;

<html>
<head>
<title>YourSiteHere<title>
</head>
<body bgcolor='colourhere'>
<font face='verdana' font size='1' font color='colourhere'> Welcome to my website! </font>
</body>
</html>

There we go, thats your basic HTML tutorials, to learn more about HTML, keep an eye out for the Basic HTML Tutorial Part 2!

Thanks, Ryan.

For any help, please e-mail [email protected]

Tutorial made strictly for the use of www.PixelResources.co.uk ©

Drugs
08-08-2006, 02:08 PM
HTML Basics Part 2 - Written By Ryan

This tutorial is Part 2 of my HTML Basics Tutorial, in this tutorial you will learn how to add effects to your text, and some other tags which could come in useful, including center, bold, italics, underline and much more!

Lets start off with the simple effects of making your text bold, italic, and underlined! To make your text have a bold effect, before you write the text, put a <b> tag in, and after the text which you want to make bold, put in the <b> closing tag which is </b>, so this is how it should be;

<html>
<head>
<title>YourSiteHere</title>
</head>
<body>
<b>Welcome to my website!</b>
</body>
</html>

And to make it italic;

<html>
<head>
<title>YourSiteHere</title>
</head>
<body>
<i>Welcome to my website!</i>
</body>
</html>

And finally to make the text underlines;

<html>
<head>
<title>YourSiteHere</title>
</head>
<body>
<u>Welcome to my website!</u>
</body>
</html>

So that's how to make text bold, italic and underline! Now lets learn a few more tags! To center something, whether it is an image or text, all you need to do is put <center> before the item you want to center, and </center> at the end of the item! If you wish to center the whole website, straight after the <html> tag put in <center> and straight before the </html> tag, inset </center>.

Now lets go on to, hmm.. Ah! Hyperlinking! Hyperlinks are words which when clicked, take you to a page, to make a hyperlink, you use a tag like this;

<a href=www.theurlhere.com>Click Here</a href>

The 'www.theurlhere.com' part is where you will put in the address that when click, the user will be taken, and the 'Click Here' part is the text that will be made into the link.

I think this pretty much covers a few more HTML tags, look out for part 3 which will include even more useful HTML tags!

Thanks, Ryan.

For any help, please e-mail [email protected]

Tutorial made strictly for the use of www.PixelResources.co.uk ©

Sygon.
08-08-2006, 02:27 PM
You may know html basics but you dont know the code tag?

Drugs
08-08-2006, 02:32 PM
What..?

Per
08-08-2006, 02:45 PM
<a href=www.theurlhere.com>Click Here</a href>
Infact, if you was going to put </a href> it wouldnt work :l
The closing tag is </a>
href is under that tag a href isnt its own tag. I like tag.
*TAG* your it.

-Patrick

ADAM:
08-08-2006, 03:52 PM
You may know html basics but you dont know the code tag?


What..?


<code> </code>

I wanted to try multi quote lol.

Mentor
08-08-2006, 04:17 PM
actualy the code tag is BBcode not html so its






Although the code tags on VB dont actually work, so i had to shove bolds in there to stop the code genirating

Drugs
08-08-2006, 04:20 PM
I didn't want to put it into a code tag >.<

And also woohoo a typo in the hyperlink code no need to go mad over it lmao.

Geek
08-08-2006, 04:39 PM
This is rather a poor way of doing things, when you could indeed use CSS to change the font and other things to make your code complient with the W3C Standards.

You don't use a doctype, which makes your code invalid and to be honest all you have shown is how to open a document using HTML and then shut it, without using the proper format.

Drugs
08-08-2006, 04:45 PM
Geek how about read the title before posting..

HTML BASICS..

Its not meant to be the worlds best tutorial its just going over a few things for newbies to HTML..

Jargit
08-08-2006, 04:46 PM
Yeh But Ryan. At Least Post Correct Information. There Are Some Wrong Tags In There....

Drugs
08-08-2006, 04:48 PM
Yeah a few errors, not hard to correct everyone makes a few mistakes o.o

Per
08-08-2006, 05:12 PM
But if i was a noob following this and i tried it all,
Then opened a site id be like WTH ITS NOT WORKING.
Kaifnx. Saying false information such as hyperlinking, would ruin a site.
Could you imagine a site without links thats actually got visiters? :d

Drugs
08-08-2006, 05:40 PM
IT WAS A SMALL MISTAKE FROM ME GOD SHUTUP ITS NOT HARD TO EDIT IT.

When it is posted on my site i will change it so stop going on about the little mistakes.

Per
08-08-2006, 05:58 PM
Lmao at you getting angry :D
Thats it really.

Want to hide these adverts? Register an account for free!