Advertisement
Laurelai

html tags

Aug 25th, 2011
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.67 KB | None | 0 0
  1. Basic Tags
  2.  
  3. <html></html> Creates an HTML document
  4.  
  5. <head></head> Sets off the title and other information that isn’t displayed on the web page itself
  6.  
  7. <body></body> Sets off the visible portion of the document
  8. Body Attributes
  9.  
  10. <body bgcolor="pink"> Sets the background color, using name or hex value
  11.  
  12. <body text="black"> Sets the text color, using name or hex value
  13.  
  14. <body link="blue"> Sets the color of links, using name or hex value
  15.  
  16. <body vlink="#ff0000"> Sets the color of followed links, using name or hex value
  17.  
  18. <body alink="#00ff00"> Sets the color of links on click
  19.  
  20. <body ondragstart="return false" onselectstart="return false"> Disallows text selection with the mouse and keyboard
  21. Text Tags
  22.  
  23. <pre></pre> Creates preformatted text
  24.  
  25. <hl></hl> Creates the largest headline
  26.  
  27. <h6></h6> Creates the smallest headline
  28.  
  29. <b></b> Creates bold text
  30.  
  31. <i></i> Creates italic text
  32.  
  33. <tt></tt> Creates teletype, or typewriter-style text
  34.  
  35. <cite></cite> Creates a citation, usually italic
  36.  
  37. <em></em> Emphasizes a word (with italic or bold)
  38.  
  39. <strong></strong> Emphasizes a word (with italic or bold)
  40.  
  41. <font size="3"></font> Sets size of font, from 1 to 7
  42.  
  43. <font color="green"></font> Sets font color, using name or hex value
  44. Links
  45.  
  46. <a href="URL"></a> Creates a hyperlink
  47.  
  48. <a href="mailto:EMAIL"></a> Creates a mailto link
  49.  
  50. <a href="URL"><img src="URL"> </a> Creates an image/link
  51.  
  52. <a name="NAME"></a> Creates a target location within a document
  53.  
  54. <a href="#NAME"></a> Links to that target location from elsewhere in the document
  55. Formatting
  56.  
  57. <p></p> Creates a new paragraph
  58.  
  59. <p align="left"> Aligns a paragraph to the left (default), right, or center.
  60.  
  61. <br> Inserts a line break
  62.  
  63. <blockquote></blockquote> Indents text from both sides
  64.  
  65. <dl></dl> Creates a definition list
  66.  
  67. <dt> Precedes each definition term
  68.  
  69. <dd> Precedes each definition
  70.  
  71. <ol></ol> Creates a numbered list
  72.  
  73. <ul></ul> Creates a bulleted list
  74.  
  75. <li></li> Precedes each list item, and adds a number or symbol depending upon the type of list selected
  76.  
  77. <div align="left"> A generic tag used to format large blocks of HTML, also used for stylesheets
  78.  
  79. <img src="name"> Adds an image
  80.  
  81. <img src="name" align="left"> Aligns an image: left, right, center; bottom, top, middle
  82.  
  83. <img src="name" border="1"> Sets size of border around an image
  84.  
  85. <hr /> Inserts a horizontal rule
  86.  
  87. <hr size="3" /> Sets size (height) of rule
  88.  
  89. <hr width="80%" /> Sets width of rule, in percentage or absolute value
  90.  
  91. <hr noshade /> Creates a rule without a shadow
  92. Tables
  93.  
  94. <table></table> Creates a table
  95.  
  96. <tr></tr> Sets off each row in a table
  97.  
  98. <td></td> Sets off each cell in a row
  99.  
  100. <th></th> Sets off the table header (a normal cell with bold, centered text)
  101. Table Attributes
  102.  
  103. <table border="1"> Sets width of border around table cells
  104.  
  105. <table cellspacing="1"> Sets amount of space between table cells
  106.  
  107. <table cellpadding="1"> Sets amount of space between a cell’s border and its contents
  108.  
  109. <table width="500" or "80%"> Sets width of table, in pixels or as a percentage of document width
  110.  
  111. <tr align="left"> or <td align="left"> Sets alignment for cell(s) (left, center, or right)
  112.  
  113. <tr valign="top"> or <td valign="top"> Sets vertical alignment for cell(s) (top, middle, or bottom)
  114.  
  115. <td colspan="2"> Sets number of columns a cell should span (default=1)
  116.  
  117. <td rowspan="4"> Sets number of rows a cell should span (default=1)
  118.  
  119. <td nowrap> Prevents the lines within a cell from being broken to fit
  120. Frames
  121.  
  122. <frameset></frameset> Replaces the <body> tag in a frames document; can also be nested in other framesets
  123.  
  124. <frameset rows="value,value"> Defines the rows within a frameset, using number in pixels, or percentage of width
  125.  
  126. <frameset cols="value,value"> Defines the columns within a frameset, using number in pixels, or percentage of width
  127.  
  128. <frame> Defines a single frame — or region — within a frameset
  129.  
  130. <noframes></noframes> Defines what will appear on browsers that don’t support frames
  131. Frames Attributes
  132.  
  133. <frame src="URL"> Specifies which HTML document should be displayed
  134.  
  135. <frame name="name"> Names the frame, or region, so it may be targeted by other frames
  136.  
  137. <frame marginwidth="value"> Defines the left and right margins for the frame; must be equal to or greater than 1
  138.  
  139. <frame marginheight="value"> Defines the top and bottom margins for the frame; must be equal to or greater than 1
  140.  
  141. <frame scrolling="value"> Sets whether the frame has a scrollbar; value may equal “yes,” “no,” or “auto.” The default, as in ordinary documents, is auto.
  142.  
  143. <frame noresize="noresize"> Prevents the user from resizing a frame
  144. Forms
  145.  
  146. For functional forms, you’ll have to run a script. The HTML just creates the appearance of a form.
  147.  
  148. <form></form> Creates all forms
  149.  
  150. <select multiple name="NAME" size=?></select> Creates a scrolling menu. Size sets the number of menu items visible before you need to scroll.
  151.  
  152. <option> Sets off each menu item
  153.  
  154. <select name="NAME"></select> Creates a pulldown menu
  155.  
  156. <option> Sets off each menu item
  157.  
  158. <textarea name="NAME" cols=40 rows=8></textarea name> Creates a text box area. Columns set the width; rows set the height.
  159.  
  160. <input type="checkbox" name="NAME"> Creates a checkbox. Text follows tag.
  161.  
  162. <input type="radio" name="NAME" value="x"> Creates a radio button. Text follows tag
  163.  
  164. <input type="text" name="NAME" size=20> Creates a one-line text area. Size sets length, in characters.
  165.  
  166. <input type="submit" value="NAME"> Creates a Submit button
  167.  
  168. <button type="submit">Submit</button> Creates an actual button that is clicked
  169.  
  170. <input type="image" border=0 name="NAME" src="name.gif"> Creates a Submit button using an image
  171.  
  172. <input type="reset"> Creates a Reset button
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement