Anda di halaman 1dari 6

Reference  

 HTML Cheat Sheet


Basic Tags <font color=?></font>
<html></html> Sets font color, using name or hex value
Creates an HTML document Links
<head></head> <a href="URL"></a>
Sets off the title and other information that Creates a hyperlink
isn't displayed on the Web page itself <a href="mailto:EMAIL"></a>
<body></body> Creates a mailto link
Sets off the visible portion of the document <a name="NAME"></a>
Header Tags Creates a target location within a document
<title></title> <a href="#NAME"></a>
Puts the name of the document in the title Links to that target location from elsewhere
bar in the document
Body Attributes Formatting
<body bgcolor=?> <p></p>
Sets the background color, using name or Creates a new paragraph
hex value <p align=?>
<body text=?> Aligns a paragraph to the left, right, or center
Sets the text color, using name or hex <br>
value Inserts a line break
<body link=?> <blockquote>
Sets the color of links, using name or hex </blockquote>
value Indents text from both sides
<body vlink=?> <dl></dl>
Sets the color of followed links, using name Creates a definition list
or hex value <dt>
<body alink=?> Precedes each definition term
Sets the color of links on click <dd>
Text Tags Precedes each definition
<pre></pre> <ol></ol>
Creates preformatted text Creates a numbered list
<hl></hl> <li></li>
Creates the largest headline Precedes each list item, and adds a number
<h6></h6> <ul></ul>
Creates the smallest headline Creates a bulleted list
<b></b> <div align=?>
Creates bold text A generic tag used to format large blocks of
<i></i> HTML, also used for style sheets
Creates italic text
<tt></tt>
Creates teletype, or typewriter-style text Graphical Elements
<cite></cite> <img src="name">
Creates a citation, usually italic Adds an image
<em></em> <img src="name" align=?>
Emphasizes a word (with italic or bold) Aligns an image: left, right, center; bottom,
<strong></strong> top, middle
Emphasizes a word (with italic or bold) <img src="name" border=?>
<font size=?></font> Sets size of border around an image
Sets size of font, from 1 to 7) <hr>
Inserts a horizontal rule <frameset rows="value,value">
<hr size=?> Defines the rows within a frameset, using
Sets size (height) of rule number in pixels, or percentage of w idth
<hr width=?> <frameset cols="value,value">
Sets width of rule, in percentage or Defines the columns within a frameset, using
absolute value number in pixels, or percentage of width
<hr noshade> <frame>
Creates a rule without a shadow Defines a single frame — or region — within a
frameset
Tables
<noframes></noframes>
<table></table>
Defines what will appear on browsers that
Creates a table
don't support frames
<tr></tr>
Sets off each row in a table Frames Attributes
<td></td> <frame src="URL">
Sets off each cell in a row Specifies which HTML document should be
displayed
<th></th>
Sets off the table header (a normal cell <frame name="name">
with bold, centered text) Names the frame, or region, so it may be
targeted by other frames
Table Attributes
<frame marginwidth=#>
<table border=#>
Defines the left and right margins for the
Sets width of border around table cells
frame; must be equal to or greater than 1
<table cellspacing=#>
<frame marginheight=#>
Sets amount of space between table cells
Defines the top and bottom margins for the
<table cellpadding=#> frame; must be equal to or greater than 1
Sets amount of space between a cell's
<frame scrolling=VALUE>
border and its contents
Sets whether the frame has a scrollbar; value
<table width=# or %> may equal "yes," "no," or "auto." The default,
Sets width of table — in pixels or as a as in ordinary documents, is auto.
percentage of document width
<frame noresize>
<tr align=?> or <td align=?> Prevents the user from resizing a frame
Sets alignment for cell(s) (left, center, or
right)
<tr valign=?> or <td valign=?>
Sets vertical alignment for cell(s) (top,
middle, or bottom)
<td colspan=#> Forms
Sets number of columns a cell should span For functional forms, you'll have to run a
<td rowspan=#> CGI script. The HTML just creates the
Sets number of rows a cell should span appearance of a form.
(default=1) <form></form>
<td nowrap> Creates all forms
Prevents the lines within a cell from being <select multiple name="NAME" size=?
broken to fit ></select>
Frames Creates a scrolling menu. Size sets the
<frameset></frameset> number of menu items visible before you
Replaces the <body> tag in a frames need to scroll.
document; can also be nested in other <option>
framesets Sets off each menu item
<select name="NAME"></select> <option>
Creates a pull down menu Sets off each menu item
<textarea name="NAME" cols=40 Creates a one-line text area. Size sets length,
rows=8></textarea> in characters.
Creates a text box area. Columns set the <input type="submit" value="NAME">
width; rows set the height. Creates a Submit button
<input type="checkbox" name="NAME"> <input type="image" border=0 name="NAME"
Creates a checkbox. Text follows tag. src="name.gif">
<input type="radio" name="NAME" Creates a Submit button using an image
value="x"> <input type="reset">
Creates a radio button. Text follows tag Creates a Reset button
<input type=text name="foo" size=20>

Anda mungkin juga menyukai