Advertisement
mohamedmowafey

j

Dec 18th, 2019
3,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XBasic 5.62 KB | None | 0 0
  1.  HTML Cheatsheet page 1 of 2
  2. Basic Tags
  3. <html> </html>
  4. Creates an HTML document
  5. <head> </head>
  6. Sets off the title & other info that isn't displayed
  7. <body> </body>
  8. Sets off the visible portion of the document
  9. <title> </title>
  10. Puts name of the document in the title bar; when
  11. bookmarking pages, this is what is bookmarked
  12. Body attributes (only used in email newsletters)
  13. <body bgcolor=?>
  14. Sets background color, using name or hex value
  15. <body text=?>
  16. Sets text color, using name or hex value
  17. <body link=?>
  18. Sets color of links, using name or hex value
  19. <body vlink=?>
  20. Sets color of visited links, using name or hex value
  21. <body alink=?>
  22. Sets color of active links (while mouse-clicking)
  23. Text Tags
  24. <pre> </pre>
  25. Creates preformatted text
  26. <h1> </h1> --> <h6> </h6>
  27. Creates headlines -- H1=largest, H6=smallest
  28. <b> </b>
  29. Creates bold text (should use <strong> instead)
  30. <i> </i>
  31. Creates italicized text (should use <em> instead)
  32. <tt> </tt>
  33. Creates typewriter-style text
  34. <code> </code>
  35. Used to define source code, usually monospace
  36. <cite> </cite>
  37. Creates a citation, usually processed in italics
  38. <address> </address>
  39. Creates address section, usually processed in italics
  40. <em> </em>
  41. Emphasizes a word (usually processed in italics)
  42. <strong> </strong>
  43. Emphasizes a word (usually processed in bold)
  44. <font size=?> </font>
  45. Sets size of font - 1 to 7 (should use CSS instead)
  46. <font color=?> </font>
  47. Sets font color (should use CSS instead)
  48. <font face=?> </font>
  49. Defines the font used (should use CSS instead)
  50. Links
  51. <a href="URL">clickable text</a>
  52. Creates a hyperlink to a Uniform Resource Locator
  53. <a href="mailto:EMAIL_ADDRESS">clickable text</a>
  54. Creates a hyperlink to an email address
  55. <a name="NAME">
  56. Creates a target location within a document
  57. <a href="#NAME">clickable text</a>
  58. Creates a link to that target location
  59. Formatting
  60. <p> </p>
  61. Creates a new paragraph
  62. <br>
  63. AInserts a line break (carriage return)
  64. <blockquote> </blockquote>
  65. Puts content in a quote - indents text from both sides
  66. <div> </div>
  67. Used to format block content with CSS
  68. <span> </span>
  69. Used to format inline content with CSS
  70. Lists
  71. <ul> </ul>
  72. Creates an unordered list
  73. <ol start=?> </ol>
  74. Creates an ordered list (start=xx,
  75. where xx is a counting number)
  76. <li> </li>
  77. Encompasses each list item
  78. <dl> </dl>
  79. Creates a definition list
  80. <dt>
  81.  Precedes eachdefintion term
  82. <dd>
  83.  Precedes eachdefintion
  84.  Graphical elements
  85. <hr>
  86. Inserts a horizontal rule
  87. <hr size=?>
  88. Sets size (height) of horizontal rule
  89. <hr width=?>
  90. Sets width of rule (as a % or absolute pixel length)
  91. <hr noshade>
  92. Creates a horizontal rule without a shadow
  93. <img src="URL" />
  94. Adds image; it is a separate file located at the URL
  95. <img src="URL" align=?>
  96. Aligns image left/right/center/bottom/top/middle (use CSS)
  97. <img src="URL" border=?>
  98. Sets size of border surrounding image (use CSS)
  99. <img src="URL" height=?>
  100. Sets height of image, in pixels
  101. <img src="URL" width=?>
  102. Sets width of image, in pixels
  103. <img src="URL" alt=?>
  104. Sets the alternate text for browsers that can't
  105. process images (required by the ADA)
  106.  HTML Cheatsheet page 2 of 2
  107. Forms
  108. <form> </form>
  109. Defines a form
  110. <select multiple name=? size=?> </select>
  111. Creates a scrolling menu. Size sets the number of
  112. menu items visible before user needs to scroll.
  113. <select name=?> </select>
  114. Creates a pulldown menu
  115. <option>
  116. Sets off each menu item
  117. <textarea name=? cols="x" rows="y"></textarea>
  118. Creates a text box area. Columns set the width;
  119. rows set the height.
  120. <input type="checkbox" name=? value=?>
  121. Creates a checkbox.
  122. <input type="checkbox" name=? value=? checked>
  123. Creates a checkbox which is pre-checked.
  124. <input type="radio" name=? value=?>
  125. Creates a radio button.
  126. <input type="radio" name=? value=? checked>
  127. Creates a radio button which is pre-checked.
  128. <input type="text" name=? size=?>
  129. Creates a one-line text area. Size sets length, in
  130. characters.
  131. <input type="submit" value=?>
  132. Creates a submit button. Value sets the text in the
  133. submit button.
  134. <input type="image" name=? src=? border=? alt=?>
  135. Creates a submit button using an image.
  136. <input type="reset">
  137. Creates a reset button
  138. Tables (use only for data layout - use CSS for page layout) Table attributes (only use for email newsletters)
  139. <table> </table>
  140. Creates a table
  141. <tr> </tr>
  142. Sets off each row in a table
  143. <td> </td>
  144. Sets off each cell in a row
  145. <th> </th>
  146. Sets off the table header (a normal cell with bold,
  147. centered text)
  148. <table border=?>
  149. Sets the width of the border around table cells
  150. <table cellspacing=?>
  151. Sets amount of space between table cells
  152. <table cellpadding=?>
  153. Sets amount of space between a cell's border and
  154. its contents
  155. <table width=?>
  156. Sets width of the table
  157. Sets vertical alignment for cells within the row
  158. (top/middle/bottom)
  159. <td valign=?>
  160. Sets vertical alignment for cell (top/middle/bottom)
  161. <td rowspan=?>
  162. Sets number of rows a cell should span (default=1)
  163. <td colspan=?>
  164. Sets number of columns a cell should span
  165. <td nowrap>
  166. Prevents lines within a cell from being broken to fit
  167. HTML5 input tag attributes
  168. (not all browsers support; visit http://caniuse.com
  169.  for details)
  170. <input type="email" name=?>
  171.  Sets a single-line textbox for email addresses
  172. <input type="url" name=?>
  173.  Sets a single-line textbox for URLs
  174. <input type="number" name=?>
  175.  Sets a single-line textbox for a number
  176. <input type="range" name=?>
  177.  Sets a single-line text box for a range of numbers
  178. <input type="date/month/week/time" name=?>
  179.  Sets a single-line text box with a calendar
  180.  showing the date/month/week/time
  181. <input type="search" name=?>
  182.  Sets a single-line text box for searching
  183. <input type="color" name=?>
  184.  Sets a single-line text box for picking a color
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement