html Guide

Lesson 1 - The Basics HTML stands for Hyper Text Mark-up Language and is the code that nearly all web pages are written in. Despite having a complicated name the actual code is very simple. Before you can start learning HTML there is one main thing that you need to know. All commands are typed within triangular brackets < >. These are called tags. When you type something between these tags it means you want to start a command. When you want to end a command you need to end the tags. To end a tag you type . That is you add a / after the first <. a word would make a word display in bold on your page. As the tags are ended then everything after a word will not be in bold. There are a few exceptions that do not need to be ended but we will come to these later. The concept of tags is the hardest thing to grasp in HTML. Once you understand that every command needs to be inside < these tags > then you are well on your way to mastering web pages.

Lesson 2 - Inserting text The majority of web pages are made up of text. If you have ever used a keyboard then you know how to type text in HTML. To type something into your webpage simply type what you want to show up. You only need to use tags if you want the text to do something special. Some commonly used tags are: this bolds text (you need to end this)
inserts a line break (like pressing enter on a keyboard)

This starts a new paragraph this is very useful for splitting up your text This makes text in italics (you need to end this) underlines text (you need to end this) Font Size: You can also change the size of your font. In HTML the sizes range from 1 (very small) to 7 (very big). To change the size of your font you need to type: type your text here You must end your font tag or all text typed afterwards will be that size. These are the different size fonts that you can use: Size 1 text Size 2 text Size 3 text Size 4 text Size 5 text Size 6 text Size 7 text

Lesson 3 - More Advanced Text Once you are comfortable with using the simple tags such as bold and underline, you can move onto other things that can make your text more interesting. Here you will learn how to add bullet points, make numbered lists and insert a horizontal line. Bullet Points: Bullet points are slightly more complicated. In HTML bullet points are called unordered lists or ul for short. To start bullet points you need to type

The code would look like this: This is what would actually be displayed on your web page: bullet one bullet two bullet three Numbered Lists: Creating a numbered list uses the same principle as creating bullet points except you use ordered list
    instead of
      . The code for an ordered list would look like this.
      1. point one
      2. point two
      3. point three
      This is what would actually be displayed on your web page: point one point two point three For horizontal lines please go to the next lesson...

      Horizontal Lines: If you want to divide the page a useful command is the horizontal rule (hr). The default rule goes all the way along the page and looks like this: -------------------------------------------------------------------------------- Where ever you want to add a line to divide a page simply type


      . You can change several things to make it look different such as its width, height and the amount of shading it has. Width can either be measured in pixels (a web page is normally about 600 pixels wide) or by typing the percentage of the screen you want it to cover. To change the width you simply type
      or
      . A horizontal rule that is 300 pixels in length looks like this: -------------------------------------------------------------------------------- Size refers to how large the horizontal rule is. You change it in the same way as you alter the width. If you wanted to make a 10 pixel wide line you would type
      and it would look like this: -------------------------------------------------------------------------------- By default horizontal rules have shading. You can create a line without any shading by typing
      . This will look similar to below. -------------------------------------------------------------------------------- You can combine as may variables as possible within the same tag. If you wanted to create a 300 pixel wide rule that was 10 pixels wide and had no shading you would type
      it would appear similar to the line below: -------------------------------------------------------------------------------- It doesn't matter what order they are in as long as they are all within the < and > tags.

      Lesson 4 - Font Colours You can change the colour of your font very easily. For the most frequently used colours you can use their name. e.g red, black, green, blue, gray, white. HTML uses American English spellings, if you want to change the colour of something, you need to type color. If you want a Grey colour you need to type Gray. If you want to make a word red you would type: text here and this would appear as text here. For more specific colours you may need to use a hexadecimal code. This is the unique code given to each shade of colour. All colours have a combination of 6 numbers and letters that represent an exact shade. Some common codes are: Bright red = FF0000 Purple = CC00CC Pink = FF66FF Light Blue = CCCCFF Lime Green = 99FF99 To use the Hexadecimal code simply type: text here This would make the text pink, like so text here. If you want to change the font colour and size you can do this in the same tag eg: type text here This would make the text small and red, like this type text here. -------------------------------------------------------------------------------- Background colour If you want to make your page more interesting you can change the background of the page. Background colour works in much the same way as font color except it affects the whole page. Normally backgrounds are white (FFFFFF) or black (000000) but you can use any colour you wish. To change your background colour simply type this near the top of your page. or You do not need to end this tag as it affects the whole page but it is good practice to put at the bottom of your page to keep things tidy. -------------------------------------------------------------------------------- Background colour in shops You have to do your background colour slightly differently in your shop, you can do one of two things. The first method is to use a background image. Type at the beginning of your shop's description and that image will be tiled as the background for your shop. You can get several Neopet backgrounds that you can use here. Alternatively, if you want a solid colour, or want a coloured background only in a certain area, you need to use a table. The simplest table would be to type this is your shop description : or
      followed by
      Type your text here as normal and then finish your table by typing the two lines below.
      Don't forget to include the last two lines, or your table will be broken. Now you should be able to put a background colour, or image in your shop :) If you wish to position the table in the centre of your page, simply add the words align=center after .

      Lesson 5 - Adding Pictures Pictures can brighten up a web page and they are a great way to show others your work. If you have created a picture that you want to use on your site you need to save it somewhere on the web. Once you know where you image is stored it is very easy to add an image to your web site. You can use any images already on the NeoPets site or an image that is somewhere else on the web. Once you know where your images are saved you are ready to write the code. The code to insert a picture is made up of three things: closes the tag When you put the code together it looks like this: The image tag is special as you don't have to end it, that is all you need to type to display an image. Now when you look at your web page you should see your picture. There are several other things you can add into the code to make the image look better including the border tag. Using this you can choose what thickness border, if any you want around your image. Some basic borders are: Border="0" no border Border="1" thin border Border="2" thicker border You simply type in border="2" inside the tag after you have typed the location of your image, like so: This will now display your picture with a thick border around it. For details how to arrange your image on your page and how to add background images go to the next lesson...

      Lesson 6 - Links You can turn anything on your site into a link to something else. If your favorite game on NeoPets is Dice-a-Roo, you can make a text or image link to the Dice-a-Roo page. You already know how to insert images or text into your web page, turning that into a link is very simple. First you need to have a URL to link to, in this example I have used the NeoPets url. I wanted to make the text click here link to www.neopets.com so I typed: The only thing that will be displayed on the web page is the text click here. This would now be click-able. When you click on it with your mouse it will take you to the NeoPets URL. You can make the text a different size, different color, bold, italic whatever but you need to start and finish the tags either side of the text. e.g to make that link bold I would put: To make an image click-able you use the same idea but instead of typing the text you put the image tag. E.g: It will automatically put a thin border around your image. To make this thicker or remove it you need to use the border tag (see lesson 5 - inserting pictures). Using this you can choose what thickness border of any you want to have around your image. Some basic borders are: Border="0" no border Border="1" thin border Border="2" thicker border If you don't want to have a border around your picture you simply type border="0" inside the tag after you have typed the location of your image, like so:

      Lesson 7 - Adding your email address and username If you have your own email address you may want other people be able to contact you. A great way to do this is to post your email address on your web site. ***Beware*** - If you post your email address on your web page that means that absolutely anybody can contact you via email. Only do this if you are sure this is something that you want to do. If you are 13 or under please check this is OK with your parents first. The code is much the same as creating a link only instead of typing in the url of the page you want to link to you type in the email address you want to pop up. For example if I wanted to post my email address as info@neopets.com I would type: info@neopets.com This would display the text info@neopets.com and when you click on it it will open up a blank email addressed to info@neopets.com. (exactly like this info@neopets.com) You may want to make the font a different size, make it bold or change the color. To do this just type the relevant tag either side of the linking text. Adding your username: If you are editing your pet's homepage there is a very simple way to get your username to appear. Just type in #OWNERLOOKUP all in capitals and it will display as your username. This is only something you can do on your pet's home page though, its won't work on another web page.

      This html Guide is courtesy of neopets.com

      Links

      home