Christopher Roberts's Website
HTML Tips & Code
Hi and welcome to my HTML tips site! On here are loads of useful (hopefully) bits of web code you can try on your site, or if you don't have one you could make up a fictitious one. All you need is the program Notepad, all Microsoft computers come with it so you won't have to buy anything. When you save your site you must make sure it has .html after it and not *.txt. Then all you need to do is open it from My Documents and it will appear as your site.
Below is the basic code you need to get started.
<html> This goes at the top of the script
<title> text </title> This goes under <html> and where the text is you put the page title
<body> You must have this at the beginning of the script, but after the <title> text </title>
<b> text </b> This the text bold where the text is you put the text you want to be bold
<br> This creates a new line
<table> </table> This creates a new table
<tr> </tr> This creates a new row in the table (this goes inside<table> </table>)
<td> </td> This creates a new row in the table (this goes inside <table><tr> </tr></table>). e.g. <table><tr><td> Your text goes here </td></tr></table>
<font color="#0000FF"> text </font> Put this before text to create blue colored text (write your text where text is)
<font color="#FF0000"> text </font> Put this before text to create Red colored text (write your text where text is)
<font color="#FFFF00"> text </font> Put this before text to create Yellow colored text (write your text where text is)
<font color="#00FF00"> text </font> Put this before text to create Green colored text (write your text where text is)
<a href="Web Address"> text </a> If you want to link text to another page, where Web Address is put the web address of the page you want to link to e.g. http://www.christopher-roberts.co.uk/, and where the text is you put what you want the link to say e.g. Back
<hr> This creates a line, like the one after this table but before the Back button
</body> You must have this at the end of the script but before </html>
</html> You must have this at the end of the script

Here is an example of a simple website:
This is the code for it:

<html>
<title>Simple Site</title>
<body bgcolor="#00FF00">
<table width="100%" border="0" align="center">
<tr><td><div align="center"><font color="#FF0000"size="+3"><b>Hello</b></font></div></td>
</tr>
</table><br>
<table width="100%" border="0" align="center">
<tr>
<td height="22"><b>Sample site, sample site</b></td>
</tr>
</table>
<br>
<hr>
<table width="100%" border="0" align="center">
<tr><td><a href="http://www.christopher-roberts.co.uk"><b>Back</b></a></td>
</tr>
</table>
</body>
</html>


Back