Site Tools


notes:html_cheat_sheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
notes:html_cheat_sheet [2026/06/03 02:36]
65.108.103.51 old revision restored (2026/06/03 01:49)
notes:html_cheat_sheet [2026/06/07 15:58] (current)
213.194.156.245 old revision restored (2026/05/29 22:46)
Line 11: Line 11:
   * A simple HTML web page   * A simple HTML web page
 <code html> <code html>
 +<!DOCTYPE ...>
 <html> <html>
-<head> <title> Title of page </title> </head> +  <head> <title> Title of page </title> </head> 
-<body background=url> This is my first webpage. </body>+  <body background=url> This is my first webpage. </body>
 </html> </html>
 </code> </code>
 +  * HTML 4 comes in three versions :
 +    * Strict which contains no deprecated elements or frames <code html>
 +<!DOCTYPE HTML PUBLIC
 +"-//W3C//DTD HTML 4.01//EN"
 +"http://www.w3.org/TR/html4/strict.dtd"></code>
 +    * Transitional which includes deprecated elements <code html> <!DOCTYPE HTML PUBLIC
 +"-//W3C//DTD HTML 4.01 Transitional//EN"
 +"http://www.w3.org/TR/html4/loose.dtd"></code>
 +    * Frameset which includes deprecated elements and frames <code html><!DOCTYPE HTML PUBLIC
 +"-//W3C//DTD HTML 4.01 Frameset//EN"
 +"http://www.w3.org/TR/html4/frameset.dtd"></code>
  
 ==== HTML Components ==== ==== HTML Components ====
Line 26: Line 38:
   * Attribute values should always be either single or double-quoted.   * Attribute values should always be either single or double-quoted.
   * Element and attribute names are not sensitive but lowercase names are recommended and required in XHTML.   * Element and attribute names are not sensitive but lowercase names are recommended and required in XHTML.
 +  * Standard attributes valid for most elements include: class, id, title, style, lang.
  
 ==== Formatting Tags ==== ==== Formatting Tags ====
Line 112: Line 125:
   * Other common symbols include: cent ¢, pound £, yen ¥, euro €, copy ©, times ×, div ÷, reg ®, sect §   * Other common symbols include: cent ¢, pound £, yen ¥, euro €, copy ©, times ×, div ÷, reg ®, sect §
  
-==== Advanced HTML ==== +==== HTML Head ==== 
-  * HTML 4 comes in three versions : +  * The head element of a page is not displayed. It contains information about the document
-    * Strict which contains no deprecated elements or frames <code html> +  * It may only contain the following tagsbase (base url for links), link (external resources e.g.style-sheets), meta, title, style, and script.
-<!DOCTYPE HTML PUBLIC +
-"-//W3C//DTD HTML 4.01//EN" +
-"http://www.w3.org/TR/html4/strict.dtd"></code> +
-    * Transitional which includes deprecated elements <code html> <!DOCTYPE HTML PUBLIC +
-"-//W3C//DTD HTML 4.01 Transitional//EN" +
-"http://www.w3.org/TR/html4/loose.dtd"></code> +
-    * Frameset which includes deprecated elements and frames <code html><!DOCTYPE HTML PUBLIC +
-"-//W3C//DTD HTML 4.01 Frameset//EN" +
-"http://www.w3.org/TR/html4/frameset.dtd"></code>+
   * Example style declaration in head <code html>   * Example style declaration in head <code html>
 <head> <head>
Line 131: Line 135:
   </style>   </style>
 </head> </code> </head> </code>
 +  * Examples of the meta tag <code html>
 +<meta name="keywords" content="HTML, DHTM" />
 +<meta name="description" content="Free tutorials" />
 +<meta name="revised" content="My Name, 6/10/99" />
 +<meta http-equiv="refresh" content="5" />
 +</code>  
 +
 +==== Advanced HTML ====
 +
 +  * <div> and <span> are used to group elements to format them with a style. <div> also divides a page into sections.
 +  * A simple script in a webpage <code html>
 +<body> 
 +  <script type="text/javascript">
 +    <!-- //to prevent display in older browsers
 +    document.write("Hello World!")
 +    //-->
 +  </script>
 +  <noscript>Javascript not supported</noscript>
 + </body> </code>
 +  * An object element with child param elements can also be used to embed content.
 +  * accesskey (character) and tabindex (integer) attributes can be used to make a page keyboard-friendly.
 +
 +  * Events allow scripts to be registered for certain user actions. There are four types of events :
 +    * window events are only valid in a body or frameset element: onload, onunload.
 +    * form element events: onchange, onselect, onreset, onsubmit, onblur, onfocus
 +    * keyboard events: onkeydown, onkeypress, onkeyup
 +    * mouse events: onclick, ondblclick, onmousedown, onmousemove, onmouseup, onmouseover, onmouseup
notes/html_cheat_sheet.1780479360.txt.gz · Last modified: 2026/06/03 02:36 by 65.108.103.51