Quick HTML Coding Reminders |
Home | Easy to Use Hex Code Color Picker
Formatting
Description
|
||
| Makes text bold | ||
| Makes text italics | ||
| Makes text underlined | ||
| Lowers text and makes it smaller. eg. Ag12 | ||
| Raises text and makes it smaller. eg. 1010 | ||
| Makes text blink in some browsers. Try and avoid. | ||
| Strikes through a line as in crossed out | ||
| Makes the text appear as on a classic typewriter | ||
text |
Makes text exactly as it is, including spaces. | |
| Makes text bold | ||
| Makes text italics |
Resizing
Description
|
||
| increase the size by one | ||
| decrease the size by one | ||
text |
writes text in biggest heading | |
text |
writes text in smallest heading | |
| writes text in smallest font size. (8 pt) | ||
| writes text in biggest font size (36 pt) |
Layout
| Description | |
| Adds paragraph break after the text. Normally two line breaks | |
| Justify text in paragraph to left | |
| Justify text in paragraph to center | |
| Justify text in paragraph to right | |
| Adds a single line break where the tag is | |
| Turns off automatic line breaks - even if text is wider than the window. | |
| Allows the browser to insert a line break at exactly this point - even if the text is within <nobr> tags. | |
| Center the text | |
| Center text | |
| Left justify text | |
| Right justify text |
Listing
<ul> = Unordered List
| Description | |
| <ul> <li>text</li> <li>text</li> <li>text</li> </ul> | Makes a bulleted list using the default bullet
type:
|
| <ul type="disc"> | Starts a bulleted list using discs as bullets:
|
| <ul type="circle"> | Starts a bulleted list using circles as bullets:
|
| <ul type="square"> | Starts a bulleted list using squares as bullets:
|
<ol> = Ordered List
| Description | |
| <ol> <li>text</li> <li>text</li> <li>text</li> </ol> |
Makes a numbered list using the default number
type:
|
| <ol start="5"> | Starts a numbered list, first # being 5.
|
| <ol type="A"> | Starts a numbered list, using capital letters.
|
| <ol type="a"> | Starts a numbered list, using small letters.
|
| <ol type="I"> | Starts a numbered list, using capital roman
numbers.
|
| <ol type="i"> | Starts a numbered list, using small roman
numbers.
|
| <ol type="1"> | Starts a numbered list, using normal numbers.
|
| <ol type="I" start="7"> | An example of how type and start can be combined.
|
Changing Font Colors, Font and Size
<font color="red" face="arial" size="2">Your Text Here</font>
Your Text Here
Not all of the parameters are required. For example, you can leave out 'face=' and keep 'size=' and 'color=' or vise versa.
Links
To pages at other sites
Click <a href="http://www.google.com">here</a> to go to Google.
Click here to go to Google.
To local pages
If the link is to another file stored in the same folder as the HTML page, you can leave out the domain reference (http://www.domainhere.com/):
Click <a href="index.htm">here</a> to go to my index page.
Click here to go to my index page.
Images
To insert an image into a webpage you would use the following code:
<img src="http://www.htmlpages.com/logo.gif">

If the image is stored in the same folder as the HTML page, you can leave out the domain reference (http://www.domainhere.com/) and simply insert the image with this code:
<img src="logo.gif">
You can adjust the height and size of the image by adding the 'height=' and 'width=' parameters to the image tag. For example:
<img src="http://www.htmlpages.com/logo.gif" height="100" width="90" >

You can also add or remove a border from you picture by adding 'border=' and either the number 0 or a number greater than 0. This indicates the border thickness. If your image has a border and you want to remove it set the border to 0.
<img src="http://www.htmlpages.com/logo.gif" border=2>

Inserting images (GIF and jpg)
Adding a link to an image
HTML tags can be combined within each other. For example if you want to make an image with a hyperlink attached to it. So take your html code and your image code:
<a href="index.html">My Index Page</a>
<img src="http://www.htmlpages.com/logo.gif">

Remember anything between the <a> and </a> tags will be clickable so we need to place the image code between them.
<a href="index.html"><img src="http://www.htmlpages.com/logo.gif"></a>
If your image has a border around it, use the 'border=' parameter to turn it off or increase it.
<a href="index.html"><img src="http://www.htmlpages.com/logo.gif" border=0></a>
You can also have your link open in a new window by adjusting the 'target=' parameter:
<a href="index.html" target="_blank">Click to open in new window</a>
Email Links
You can add your email address to a webpage so that when clicked opens up the person's email client. This isn't recommended these days because of spam bots. Spam bots crawl through and steal your email address. For more information on how to protect against it read Spam Proof Your Email Addresses.
<a href="mailto:j.smith@youremailaddress.org">Email Me - Click me for example</a>
Email Me - Click me for example
You can also have it automatically insert a subject and email body as seen below:
<a href="mailto:j.smith@youremailaddress.org?subject=News&body=Great news, I now know basic HTML code!">Email John - Click me for example</a>
Email John - Click me for example
Backgrounds
Colors
You are able to add a fixed colored background to your web pages by adjusting the <body> tag. The body tag is only found in the document once and should not be duplicated. This adjusts the background color for the entire page just just elements of it.
<body bgcolor="yellow">
Your entire webpage would have a background color like this.
|
<body bgcolor="red">
Your entire webpage would have a background color like this.
|
Your can also use hex code (hexadecimal code). These codes are symbolic of most of the colors and their shades. Each hex code is made up of six characters and sometimes a hash (#) which isn't necessary. As hex is 16 and there 6 characters that's 166 = 16,777,216 different colors. For more information on hexadecimal color and a easy to use color pick see here.
<body bgcolor="#F556CC">
Your entire webpage would have a background color like this.
|
<body bgcolor="#83CBA0">
Your entire webpage would have a background color like this.
|
You can also use a pre-selected image of your choice such as a favorite picture or wallpaper. Once again you need to adjust the body tag which should be built into your html code structure.
<body background="mywallpaper.jpg">
Your entire webpage would have a background color like this:
|
You can also 'fix' your background image so when you scroll it doesn't move. However this doesn't work on all browsers. See the example below:
<body background="mywallpaper.jpg" bgproperties="fixed">
Tables
Tables are defined with the table tag:
<table></table>
Tables are made up of rows and columns, therefore the table tags alone won't build your tables. To add rows to your table use tables rows:
<tr></tr>
To divide your table into columns use the table divide tag:
<td></td>
For a table with one column use can use the below code:
<table border=1>
<tr>
<td>Row 1</td>
</tr>
<tr>
<td>Row 2</td>
</tr>
<tr>
<td>Row 3</td>
</tr>
</table>
| Row 1 |
| Row 2 |
| Row 3 |
For a table with two columns you can use this code:
<table border=1 >
<tr>
<td>Row 1 - Left </td>
<td>Row 1 - Right </td>
</tr>
<tr>
<td>Row 2 - Left</td>
<td>Row 2 - Right </td>
</tr>
<tr>
<td>Row 3 - Left</td>
<td>Row 3 - Right </td>
</tr>
</table>
| Row 1 - Left | Row 1 - Right |
| Row 2 - Left | Row 2 - Right |
| Row 3 - Left | Row 3 - Right |