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/12 16:13]
14.175.218.214 old revision restored (2026/06/03 02:36)
notes:html_cheat_sheet [2026/06/13 18:20] (current)
216.73.216.206 old revision restored (2026/06/12 06:22)
Line 65: Line 65:
   * <code html>   * <code html>
      <table border="1">      <table border="1">
-     <caption>My Table</caption> 
      <tr><th>header 1</th> <th>header 2</th></tr>      <tr><th>header 1</th> <th>header 2</th></tr>
      <tr><td>row 1-cell 1</td> <td>row 1-cell 2</td></tr>      <tr><td>row 1-cell 1</td> <td>row 1-cell 2</td></tr>
      </table> </code>      </table> </code>
   * A table with border 0 can be used to format the layout of a page.   * A table with border 0 can be used to format the layout of a page.
-  * A table can also be in the form:  <thead> <tfoot> <tbody> , but all three must be specified and contain at least one row. 
-  * To set attributes of columns in a table, a colgroup with column entries can be used e.g. <code html> 
-<table border="1"> 
-<colgroup span="2"> 
-<col width="20"></col> 
-<col width="50"></col> 
-</colgroup> ... </table> 
-</code> 
  
 ==== Forms ==== ==== Forms ====
Line 154: Line 145:
 ==== Advanced HTML ==== ==== Advanced HTML ====
  
-  * <div> is used to group elements or divide page into sections. <spanis used for selecting part of an element. Both can be used for formatting purposes.+  * <div> and <span> are used to group elements to format them with style. <divalso divides page into sections.
   * A simple script in a webpage <code html>   * A simple script in a webpage <code html>
 <body>  <body> 
Line 172: Line 163:
     * keyboard events: onkeydown, onkeypress, onkeyup     * keyboard events: onkeydown, onkeypress, onkeyup
     * mouse events: onclick, ondblclick, onmousedown, onmousemove, onmouseup, onmouseover, onmouseup     * mouse events: onclick, ondblclick, onmousedown, onmousemove, onmouseup, onmouseover, onmouseup
- 
-==== XHTML ==== 
-  * XHTML is a stricter and cleaner replacement for HTML defined as an XML format. 
-  * XHTML requires elements to be closed, properly nested and lowercase. 
-  * Documents must have a DOCTYPE declaration and only a single root element. They must have a head with a title and a body. 
-  * Attributes must be lowercase with quoted values and must have values (e.g. checked="checked"). 
-  * id replaces the name attribute, xml:lang replaces lang but both should be used for compatibility. 
-  * There are three XHTML variations 
-    * Strict - No presentational attributes allowed <code html> 
-<!DOCTYPE html 
-PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></code> 
-    * Transitional - Presentational attributes allowed but no frames <code html><!DOCTYPE html 
-PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></code> 
-    * Frameset - Allows presentational attributes and frames <code html> 
-<!DOCTYPE html 
-PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></code> 
- 
- 
notes/html_cheat_sheet.1781306024.txt.gz · Last modified: 2026/06/12 16:13 by 14.175.218.214