Вы находитесь на странице: 1из 11

Table of Contents

1. Standard tags
• Formatting text
• Default web page
2. Multimedia
• Image
• Horizontal rule

HTML guide
• Embed media
• Sound
3. Tables
4. Forms
• Form
• Button
• Checkbox
• Radiobutton
• Listbox
• Combobox
• Textbox
• Password box
• Text area (multi line)
5. Anchors
• Anchor
• Link to location
• Link inside document
• Link to email
• Picture as a link
• Button link
6. Lists
• Unordered list
• Ordered list
• Definition list
7. Frames
• Iframe
• Frame
8. Some cool things
• Address
Standard formatting

Format Tag
Bold <b>Text here</b>
Italics <i>Text here</i>
Underline <u>Text here</u>
Center <center>Text here</center>
Right <right>Text here</right>
Left <left>Text here</left>
Font <font face=”” size=”-1 to 4” color=”color name”>Text here</font>
Superscript <sup>Text here</sup>
Subscript <sub>Text here</sub>
H1-H6 <h1>Text here</h1> 1-6 6 being largest and boldest
Strike through <strike>Text here</strike>
Teletype <tt>Text here</tt>
Smaller font <small>Text here</small>
Larger font <big>Text here</big>
Blink <blink>Text here</blink> Only supported on netscape as far as I know
Pre formatted <pre>Text here</pre> Allows you to type in html code without the browser seing it
text as code if you want to show hoe to do something in html on your page
Remark <!---Your text that you don't want on the web page goes here--->

1. You can add name=”” class=”” and id=”” to any of these tags to identify them name and class is
the ones I usually use and sometimes id
2.
Default HTML empty file
---------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title> <!---The title that will be on the top in the title bar--->

<style type="text/css"> <!---This is where you declare CSS--->

</style>

</head>

<body>

<script type="text/javascript" language="javascript"> <!---This is where you declare your script--->

</script>
</body>
</html>

--------------------------------------------------------------------------------------------------------------------------------------

Note: CSS must be declared in the hed tags, Script can be declared either in the head tags or in the body bags
Multimedia
Images
Image tag
<img src="" alt="" align="" border="0">

• src is the location of the image


• alt is alternate text incase the browser can not read the image
• align is alignment to the page left right or center
• border is the border thickness 1-10

Image map
<MAP NAME="map1">
<AREA
HREF="contacts.html" ALT="Contacts" TITLE="Contacts"
SHAPE=RECT COORDS="6,116,97,184">
<AREA
HREF="products.html" ALT="Products" TITLE="Products"
SHAPE=CIRCLE COORDS="251,143,47">
<AREA
HREF="new.html" ALT="New!" TITLE="New!"
SHAPE=POLY COORDS="150,217, 190,257, 150,297,110,257">
</MAP>

<IMG SRC="testmap.gif"
ALT="map of GH site" BORDER=0 WIDTH=300 HEIGHT=300
USEMAP="#map1"><BR>

• Declare the map


• Declare the area of the map
• Shape can be either circle, rectangle, or polygram
• Coords indicates start from the left, from the top, stop from the top, stop from the left

Horizontal rule
<hr size="3" width="75%" color="blue">

• Size is the thickness


• Width is how much of the web page it will use. This one will go 75% of the way across
• Color is optional if you do not use then it makes a standard non color rule

Marquee
<marquee align="" behavior="scroll|slide|alternate" bgcolor="" height="" width="" direction="left|right"
loop="infinite|value" scrollamount="" scrolldelay="" title=""></marquee>

• Behavior can be scroll slide or alternate


• direction can be right of left
• loop can be infinite as in forever or a number value which would go that many times then stop
Media continued

Embed media
<embed src="file" hidden="true|false" type="mimetype" width="" height="" alt="" name=""></embed>

• src is the file name to play


• hidden indicates if you want the player to show or not
• type should always be mimetype although it is not necessary to put it in unless it will be played on a web
page for the public
• height and width is the height and width of the player if shown
• alt is an alternate text if the player is not able to be shown
• name is the name of the player

Background sound
<bgsound src="" balance="" loop="infinite" volume="">

• src is the location of the sound to play


• balance is the sound balance from -1000 to 1000
• loop if either infinite to play forever or a number indicating the number fo times to play the sound
• volume is the volume to play from 0 to 1000

Table
<table cellspacing="2" cellpadding="2" width="22%" height="75%" “align=center” bgcolor=”yellow”
border=”3”>
<th>This is the teablehead</th>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tfoot align="" bgcolor="" title="">This is the footer</tfoot>
</table>

• Cellspacing and cellpadding indicate the cushion of information between the text and the border. More
padding and spacing makes the cells bigger to allow more padding
• width is the width of the table height is the height of the table. If you leave these blank the cells will
automatically space by the text making all cells equal in size
• <th> is the table heading. This text would be at the top of the table kind of like a heading
• <tf> is the table footer if you want to put something at the bottom of the table like a chart number or
something. Bgcolor stands for background colot
• <tr> is table row. Use this everytime you want to start another row
• <td> is the table cell that you write the information of the table in
Forms
If you use a control and want to get information with a script it must be in a form with a name. All of these
should also include a name and a class and id inside the tag for instance name=”” class=”” id=””. This allows
you to call it from a script. You can also include a javascript event with a button like OnClick to make the button
do something.
Some things that all these ask is value which means label or if you make a button and you want the button to
read Save you would fill value as Save or value=”Save”

Control Tag Description


Form <form action="url" method="get|post" Method is get or post depending on what the
enctype="mimetype" target="" title=""> form is to do. Enctype is always mimetype.
</form>
Button <input type="button" value="Text on button"
size=”3”>
Submit button <input type="submit"> Used to submit a form. Basically the same
as a regular button
Reset button <input type="reset"> Used to submit a form. Basically the same
as a regular button
Radiobutton <input type="radio" name="" value=”” Checked=”true” if you want it checked
checked=”true”>
Combobox <select name=""> The items go on the right side of <option>
<option>4 The lits here would be 4 and 6
<option>6
</select>
Listbox <select name="" size=4> The items go on the right side of <option>
<option>
<option>
</select>
Image <input name="" type="image" src="" Makes a image in the form
border="0">
File browser <input type="file" value=""> This allow you to pick a file then puts the
name is a text box the control also makes
Password box <input name="" type="password" value="">
Textbox <input name="" type="text" value="Hello"> To make just text remove the borders with
css
Hidden box <input name="" type="hidden" value=""> This makes a box that the user can not see in
<!---Hidden text---> case you want to use something but so not
want the user to be able to view or see it
Text area <textarea name="" rows=”” cols=”” Simular to rtf editor in VB. Rows and cols
></textarea> indicate the height and width. This is not
pixel though so you may have to play with
size to get the size you want
Anchors and links

Type Code Description


Anchor <a>The area</a> Use this to mark a location on the
webpage so it can be called later
Link to a location <a
href=”www.charter.net”>Charter
</a>
Link to email<a <a ?subject fills in the subjext line
href="mailto:mjpliv.eastlink.ca"> href="mailto:rjdeible@charter.net
Send me some mail!</a> ?subject=Just me">Send me
some mail!</a>
Link to a place on the page <a href=#locationindoc>Click To use this you must first make a
me</a> anchor in the document and name
it like <a
name=”locationindoc”></a>
Use a picture as a link <a First make a picture named
href="http://www.google.com"><im C:\Pic.jpg then wrap it in a link
g src="c:\pic.pg"></img></a>
Button link <input type="button" name=button1 You are using a cut version of
value=”Click me” javascript to do this so if it
onclick=location.href('http://www.g doesn't work tweak a little the
oogle.com')> coding has to be perfect
Lists
Unordered list
This is a list that is not numbered in other words a bullet list

<ul>
<li>List item 1</li>
<li>List item 2</li>
</ul>

Ordered list
This is a numbered list
<ol>
<li>List item 1</li>
<li>List item 2</li>
</ol>

Definition list
This would be like If you wanted to make a glossary like a dictionary and show a word and the meaning

<dt>
<dt title="">The term
<dd title="">Definition of the term
</dt>

Frames
Regular frame

<frame name="" src="C:\" frameborder="" marginwidth="" marginheight="" noresize scrolling="yes|no|auto">

Iframe- floating frame

<iframe src="C:\" name="" width="" height="" align="" frameborder="" marginwidth="" marginheight=""


scrolling="yes|no|auto"></iframe>
Some cool things
Blocks
Address listing
<address>Russell Deible<br>6822 N Lafayette<br>Greenville, Michigan<br>48838</address>

Вам также может понравиться