|
BASIC HTML CODING |
||||||
|
|
||||||
|
Html codes can be overwhelming and looks like Greek to most people. However, if you have a basic web page and just need to give it a little flare, there are many simple codes that can be used.
|
||||||
|
Text Tags |
||||||
|
Bold Text <b> your text here </b>
Any time you put / in front of a code, it will turn the code off and put it back to the previous. |
||||||
|
Italics
|
||||||
|
Underline
|
||||||
|
Combination <b><i><u> your text here </b></i></u>
You can use a combination of 2 codes or all 3 at the same time.
|
||||||
|
Fonts |
||||||
|
Font size
For: The pirate sailed on the deep blue sea.
Type: The <font size="4">pirate sailed </font> on the deep blue sea. Or: The <font size= +2>pirate sailed </font> on the deep blue sea.
|
||||||
|
Font color
To have the word pirate in the previous sentences appear in a different color type: The <font color="#0000FF">pirate</font> sailed on the deep blue sea.
Font style
For: The pirate sailed on the deep blue sea.
Type: The <font face="Comic Sans MS">pirate sailed </font> on the deep blue sea.
Please be careful with the font styles. The font needs to be one that is common, if you choose a font that is not on the computer viewing your page; the computer viewing it will use a default font. Most browsers uses Times New Roman for the default font.
Some Common fonts are:
You can combine font codes in the same command. To apply multiple codes to the words pirate sailed, you can type: The <font face="Arial" size="4" color="#0000FF">pirate sailed </font>on the deep blue sea.
You do not have to put all codes every time; just enter the codes that you wish to change. Notice that the code </font> turns all font codes off and puts it back to the previous. |
||||||
|
Links |
||||||
|
Create a hyperlink <a href="URL_Address"> visible text here </a>
Your visible text can be the url name or any name you give it. The following examples are having the visible text link to the web site http://www.htmlgoodies.com/,
To have your link open in a new browser window, just add target=”_blank” after the <a
To have the following link open in a new browser window:
Type: Go to <a target=”_blank” href="http://www.htmlgoodies.com/">href="http://www.htmlgoodies.com/"> http://www.htmlgoodies.com/</a>for more tips on HTML coding.
|
||||||
|
Create an email link <a href="mailto:EMAIL_Address"> visible text here </a> This works basically like the hyperlink but with the email info.
To make the words My Name link to an email address, Type: <a href="mailto:username@yourdomain.com">My Name</a>
Substituting username@yourdomain.com for the desired email address. It is not a good practice to show the actual email address as the visible text, it is recommended to have the visible text show the person’s name or some other text. A lot of spam is cause by programs searching web pages for email addresses. If you create the link correctly, the default email program will open with the email address shown when a user clicks on the visible text. |
||||||
|
|
||||||
|
Formatting |
||||||
|
Create a new paragraph <p> your text here </p> |
||||||
|
Paragraph Alignment <p align=?> your text here </p>
|
||||||
|
Line break <br>
|
||||||
|
Horizontal Rule (line) <hr>
You can specify height, width and color.
<hr color="#0000FF"> (default is black with clear center, hex values are explained later in this document)
<hr width="50%"> (default is 100%)
You can also combine the codes.
<hr color="#0000FF" width="75%" size="4">
|
||||||
Create an extra Space
This
will add spaces in your line, you may type it more
than once to create more spaces.
Bullets and Numbered List
Numbered list <ol> your text here </ol>
<ul> your text here </ul>
<li> your text here </li>
The only difference in the coding of the below two examples are the codes <ol> and <ul> The codes that create the bullets or numbering are shown in bold (the bold is for reference only; you do not need to bold the code when typing). In both cases you will put <li> before each bulleted or numbered item and </li> at the end of each.
The command “"” is to insert quotation marks, it has nothing to do with the bullets and numbering formatting. Some Web-based webpage programs let you build basic sites by just typing text without codes, with these programs; html coding is optional and is used to enhance your page. In most cases, these programs do not require you to type codes such as the “"” code to add symbols even if you are using html codes for enhancement; instead they let you type the actual symbol (in this case the quotation marks).
|
|
Color Codes (hex values) When you're adding a color to your Web page with HTML, you'll need to use what's called the hex code, which is something that the browser will be able to understand. **Please note that colors do not always view the same on different computers. Display settings will affect they way the colors are displayed.
Here are some basic colors: Black = #000000 To view these shades and hex codes of other shades, you can go to:
|