XHTML XHTML空白页

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
       <title>Page Title</title>
       <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/>
</head>

<body>

</body>

</html>

XHTML 强制Internet Explorer 8像Internet Explorer 7一样呈现

<meta http-equiv="X-UA-Compatible" content="IE=7">

XHTML 形式框架

<!doctype html>
<html lang="en">
<head>
  <style>
    body {
      font: 13px "Lucida Grande", Lucida, Verdana, sans-serif; 
    }
    .form-row {
      margin-top: 0px;
      padding-top: 4px;
      padding-right: 0;
      padding-bottom: 4px;
      padding-left: 4;
      margin-left: 0px;
    }
    legend {
      background: #fff;
      border: 1px solid #00AFF0;
      padding: 5px 10px;
      border-radius: 5px;
    }
    fieldset {
      background: #eee;
      border: 1px solid #00AFF0;
      border-radius: 5px;
      padding: 15px;
      width: 275px;
    }
    label {
      font-weight: normal;
    }
    input.input, textarea.textarea {
      border-radius: 3px;
      resize: none;
      font: 13px "Lucida Grande", Lucida, Verdana, sans-serif;
      padding: 3px;
      margin: 0;
      border-top: 1px solid #8e8e8e;
      border-left: 1px solid #8e8e8e;
      border-bottom: 1px solid #e1e1e1;
      border-right: 1px solid #e1e1e1;
      background: #fefefe;
    }
    input.input:focus, textarea.textarea:focus {
      background-color: #fefeee;
    }
    .submit {
      border: 1px solid #666666;
      padding-top: 3px;
      padding-right: 6px;
      padding-bottom: 3px;
      padding-left: 6px;
      border-radius: 3px;
    }

</style>
</head>
<body>
  <form action="#" method="post" name="" id="">
<fieldset>
  <legend>Contact Form</legend>
    <div class="form-row">
      <label for="First Name">First Name</label>
      <br />
      <input type="text" class="input" id="First Name" name="First Name" />
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Last Name">Last Name:</label><br />
      <input maxlength="50" size="20" class="input" id="Last Name" name="Last Name">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Title">Title:</label><br />
      <input maxlength="50" size="20" class="input" id="Title" name="Title">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Company Name">Company Name:</label><br />
      <input maxlength="50" size="20" class="input" id="Company Name" name="Company Name">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Phone">Phone:</label><br />
      <input maxlength="50" size="20" class="input" id="Phone" name="Phone">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Email">Email:</label><br />
      <input maxlength="50" size="20" class="input" id="Email" name="Email">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Industry">Industry:</label><br />
      <select class="input" id="Industry" name="Industry">
        <option value="--">-- Choose an Industry --</option>
        <option value="Retail">Retail</option>
        <option value="Restaurants">Restaurants</option>
      </select>
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Other Industry">Other Industry:</label><br />
      <input maxlength="50" size="20" class="input" id="Other Industry" name="Other Industry">
    </div><!--/form-row-->
    <div class="form-row">
      <label for="Comments">Comments:</label><br />
      <textarea name="Comments" class="textarea" id="Comments" cols="30" rows="4"></textarea>
    </div><!--/form-row-->
    <div class="form-row">
      <input type="submit" class="submit" id="submit" value="Submit" />
    </div></div><!--/form-row-->
  </fieldset>
</form>


</body>
</html>

XHTML 新的空白文件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Document sans titre</title>

    <link href="static/css/global.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="static/css/print.css" rel="stylesheet" type="text/css" media="print" />

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.jss" type="text/javascript"></script>
    <script src="static/js/functions.js" type="text/javascript"></script>
  </head>

  <body>
  
  </body>
</html>

XHTML XHTML模板

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><%= @page_title || "CHANGE DEFAULT PAGE TITLE IN application.html.erb" %></title>
<%= javascript_include_tag :defaults %>
<%= stylesheet_link_tag 'style' %>
</head>
<body>
	<div id="PageHeader"> </div>
	<div id="PageContent">	
		<%= yield %>											
	</div>
	<div id="PageFooter">
		 
	</div>
</body>
</html>

XHTML 现代字体系列

Myriad Pro,Myriad Web Pro Regular,Lucida Grande,Geneva,Trebuchet MS,sans-serif

XHTML 内联弹出窗口

<a onclick="window.open('http://www.somesite.com','','width=656,height=433,left='+((screen.width-800)/2)+',top='+((screen.height-600)/2)+',scrollbars=yes');" href="javascript:;" rel="nofollow" title="">sometext</a>

XHTML 带有消息类和测试代码的XHTML代码

<!-- Sample Content to Plugin to Template -->
<h1>CSS Basic Elements</h1>

<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>

<hr />

<h1>Messages</h1>

<div class="message information">
  <h4>Information</h4>
  <p>Information message goes right here. Information message goes right here. Information message goes right here. Information message goes right here. Information message goes right here.</p>
</div>
<div class="message error">
  <h4>Error</h4>
  <p>Error message goes right here. Error message goes right here. Error message goes right here. Error message goes right here. Error message goes right here. Error message goes right here.</p>
</div>
<div class="message notice">
  <h4>Status</h4>
  <p>Status message goes right here. Status message goes right here. Status message goes right here. Status message goes right here. Status message goes right here. Status message goes right here.</p>
</div>
<div class="message success">
  <h4>Success</h4>
  <p>Success message goes right here. Success message goes right here. Success message goes right here. Success message goes right here. Success message goes right here. Success message goes right here.</p>
</div>

<hr/>

<h1 id="headings">Headings</h1>

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

<hr />

<h1 id="paragraph">Paragraph</h1>

<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>

<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>


<hr />

<h1 id="list_types">List Types</h1>

<h3>Definition List</h3>
<dl>
	<dt>Definition List Title</dt>
	<dd>This is a definition list division.</dd>
</dl>

<h3>Ordered List</h3>
<ol>
	<li>List Item 1</li>
	<li>List Item 2</li>
	<li>List Item 3</li>
</ol>

<h3>Unordered List</h3>
<ul>
	<li>List Item 1</li>
	<li>List Item 2</li>
	<li>List Item 3</li>
</ul>


<hr />

<h1 id="form_elements">Fieldsets, Legends, and Form Elements</h1>

<fieldset>
	<legend>Legend</legend>

	<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>

	<form method="post" action="#">
		<h2>Form Element</h2>

		<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p>

		<p><label for="text_field">Text Field:</label><br />
		<input type="text" id="text_field" name="text_field" /></p>

		<p><label for="text_area">Text Area:</label><br />
		<textarea id="text_area" name="textarea" rows="5" cols="20"></textarea></p>

		<p><label for="select_element">Select Element:</label><br />
			<select name="select_element" id="select_element">
			<optgroup label="Option Group 1">
				<option value="1">Option 1</option>
				<option value="2">Option 2</option>
				<option value="3">Option 3</option>
			</optgroup>
			<optgroup label="Option Group 2">
				<option value="1">Option 1</option>
				<option value="2">Option 2</option>
				<option value="3">Option 3</option>
			</optgroup>
		</select></p>

		<p><label>Radio Buttons:</label><br />
			<input type="radio" class="radio" name="radio_button" value="radio_1" /> Radio 1<br/>
				<input type="radio" class="radio" name="radio_button" value="radio_2" /> Radio 2<br/>
				<input type="radio" class="radio" name="radio_button" value="radio_3" /> Radio 3<br/>
		</p>

		<p><label>Checkboxes:</label><br />
			<input type="checkbox" class="checkbox" name="checkboxes" value="check_1" /> Radio 1<br/>
				<input type="checkbox" class="checkbox" name="checkboxes" value="check_2" /> Radio 2<br/>
				<input type="checkbox" class="checkbox" name="checkboxes" value="check_3" /> Radio 3<br/>
		</p>

		<p><label for="password">Password:</label><br />
			<input type="password" class="password" id="password" name="password" />
		</p>

		<p><label for="file">File Input:</label><br />
			<input type="file" class="file" id="file" name="file" />
		</p>

		<p>
		  <button>Submit</button> <button type="reset">Clear</button>
		</p>

	</form>

</fieldset>


<hr />

<h1 id="tables">Tables</h1>

<table>
  <caption>Table Caption Goes Here</caption>
	<thead>
	  <tr>
  		<th>Table Header 1</th><th>Table Header 2</th><th>Table Header 3</th>
  	</tr>
  </thead>
  <tfoot>
    <tr>
      <th>Footer 1</th><th>Footer 2</th><th>Footer 3</th>
    </tr>
  </tfoot>
	<tbody>
	  <tr>
  		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
  	</tr>
  	<tr class="even">
  		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
  	</tr>
  	<tr>
  		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
  	</tr>
  </tbody>

</table>


<hr />

<h1 id="misc">Misc Stuff - abbr, pre, code, sub, sup, etc.</h1>

<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. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.  <abbr title="Avenue">AVE</abbr></p>

<pre>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. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.  <abbr title="Avenue">AVE</abbr></pre>

<blockquote>
	<p>This stylesheet is going to help so freaking much.</p>
	<p>-Blockquote</p>
</blockquote>

<!-- End of Sample Content -->

XHTML 新的XHTML 1.0过渡文档

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

XHTML 新的元数据和CSS链接

<meta name="description" content="Add your sites description here" />
 <meta name="keywords" content="Add,your,site,keywords,here" />
  <link rel="icon" type="image/x-icon" href="images/favicon.ico" />
  <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
  <link rel="stylesheet" type="text/css" href="css/reset.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />