HTML Element Test Code - Valid Strict XHTML


/ Published in: HTML
Save to your folder(s)

I first posted this code on my http://sitefromscratch.com site, but I decided to repost it up here on snipplr.com with some of the most recent modifications I've made. This code validates through W3C Strict XHTML Standards.


Copy this code and paste it in your HTML
  1. <!-- Sample Content to Plugin to Template -->
  2. <h1>CSS Basic Elements</h1>
  3.  
  4. <p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
  5.  
  6. <hr />
  7.  
  8. <h1 id="headings">Headings</h1>
  9.  
  10. <h1>Heading 1</h1>
  11. <h2>Heading 2</h2>
  12. <h3>Heading 3</h3>
  13. <h4>Heading 4</h4>
  14. <h5>Heading 5</h5>
  15. <h6>Heading 6</h6>
  16.  
  17. <hr />
  18.  
  19. <h1 id="paragraph">Paragraph</h1>
  20.  
  21. <p><img src="http://farm3.static.flickr.com/2224/2208833842_5dfe63f367.jpg" alt="Brandon and the Boys" />Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a> adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
  22.  
  23. <p>Lorem ipsum dolor sit amet, <em>emphasis</em> consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
  24.  
  25.  
  26. <hr />
  27.  
  28. <h1 id="list_types">List Types</h1>
  29.  
  30. <h3>Definition List</h3>
  31. <dl>
  32. <dt>Definition List Title</dt>
  33. <dd>This is a definition list division.</dd>
  34. </dl>
  35.  
  36. <h3>Ordered List</h3>
  37. <ol>
  38. <li>List Item 1</li>
  39. <li>List Item 2</li>
  40. <li>List Item 3</li>
  41. </ol>
  42.  
  43. <h3>Unordered List</h3>
  44. <ul>
  45. <li>List Item 1</li>
  46. <li>List Item 2</li>
  47. <li>List Item 3</li>
  48. </ul>
  49.  
  50.  
  51. <hr />
  52.  
  53. <h1 id="form_elements">Fieldsets, Legends, and Form Elements</h1>
  54.  
  55. <legend>Legend</legend>
  56.  
  57. <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus.</p>
  58.  
  59. <form method="post" action="#">
  60. <h2>Form Element</h2>
  61.  
  62. <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p>
  63.  
  64. <p><label for="text_field">Text Field:</label><br />
  65. <input type="text" id="text_field" name="text_field" /></p>
  66.  
  67. <p><label for="text_area">Text Area:</label><br />
  68. <textarea id="text_area" name="textarea" rows="5" cols="20"></textarea></p>
  69.  
  70. <p><label for="select_element">Select Element:</label><br />
  71. <select name="select_element" id="select_element">
  72. <optgroup label="Option Group 1">
  73. <option value="1">Option 1</option>
  74. <option value="2">Option 2</option>
  75. <option value="3">Option 3</option>
  76. <optgroup label="Option Group 2">
  77. <option value="1">Option 1</option>
  78. <option value="2">Option 2</option>
  79. <option value="3">Option 3</option>
  80. </select></p>
  81.  
  82. <p><label>Radio Buttons:</label><br />
  83. <input type="radio" class="radio" name="radio_button" value="radio_1" /> Radio 1<br/>
  84. <input type="radio" class="radio" name="radio_button" value="radio_2" /> Radio 2<br/>
  85. <input type="radio" class="radio" name="radio_button" value="radio_3" /> Radio 3<br/>
  86. </p>
  87.  
  88. <p><label>Checkboxes:</label><br />
  89. <input type="checkbox" class="checkbox" name="checkboxes" value="check_1" /> Radio 1<br/>
  90. <input type="checkbox" class="checkbox" name="checkboxes" value="check_2" /> Radio 2<br/>
  91. <input type="checkbox" class="checkbox" name="checkboxes" value="check_3" /> Radio 3<br/>
  92. </p>
  93.  
  94. <p><label for="password">Password:</label><br />
  95. <input type="password" class="password" id="password" name="password" />
  96. </p>
  97.  
  98. <p><label for="file">File Input:</label><br />
  99. <input type="file" class="file" id="file" name="file" />
  100. </p>
  101.  
  102. <p>
  103. <button>Submit</button> <button type="reset">Clear</button>
  104. </p>
  105.  
  106. </form>
  107.  
  108.  
  109.  
  110. <hr />
  111.  
  112. <h1 id="tables">Tables</h1>
  113.  
  114. <caption>Table Caption Goes Here</caption>
  115. <tr>
  116. <th>Table Header 1</th><th>Table Header 2</th><th>Table Header 3</th>
  117. </tr>
  118. </thead>
  119. <tr>
  120. <th>Footer 1</th><th>Footer 2</th><th>Footer 3</th>
  121. </tr>
  122. </tfoot>
  123. <tr>
  124. <td>Division 1</td><td>Division 2</td><td>Division 3</td>
  125. </tr>
  126. <tr class="even">
  127. <td>Division 1</td><td>Division 2</td><td>Division 3</td>
  128. </tr>
  129. <tr>
  130. <td>Division 1</td><td>Division 2</td><td>Division 3</td>
  131. </tr>
  132. </tbody>
  133.  
  134.  
  135.  
  136. <hr />
  137.  
  138. <h1 id="misc">Misc Stuff - abbr, acronym, pre, code, sub, sup, etc.</h1>
  139.  
  140. <p>Lorem <sup>superscript</sup> dolor <sub>subscript</sub> amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. <cite>cite</cite>. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. <acronym title="National Buttars Association">NBA</acronym> Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. <abbr title="Avenue">AVE</abbr></p>
  141.  
  142. <pre>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. <acronym title="National Buttars Association">NBA</acronym> Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. <abbr title="Avenue">AVE</abbr></pre>
  143.  
  144. <p>This stylesheet is going to help so freaking much.</p>
  145. <p>-Blockquote</p>
  146.  
  147. <!-- End of Sample Content -->

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.