Tags:XHTML (List)
From The Scripters Wiki
This page is a full list of elements without the explanation. Basically, it's a human-readable version of this. If you'd rather have a more step-by-step process in building a page, refer to Tags:XHTML.
Doctypes
XHTML 1.0 Strict <tt>DOCTYPE</tt> <pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></pre>
XHTML 1.0 Transitional <tt>DOCTYPE</tt>
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transtional.dtd"></pre>
XHTML 1.0 Frameset <tt>DOCTYPE</tt>
<pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></pre>
Page Structure
- <tt>html</tt>
- <tt>head</tt>
- <tt>title</tt>
- <tt>meta</tt>
- <tt>link</tt> -- Import external Cascading Stylesheet
- <tt>style</tt> -- Define stylesheet
- <tt>body</tt>/<tt>frameset</tt>
<pre><html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" dir="ltr"> <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" />
<style type="text/css">
h1 {
color: #000;
}
</style>
</head> <body>
{Content}
</body> </html></pre>
<nowiki>**</nowiki>Note: <tt>dir</tt> is optional and if supplied must be '<tt>ltr</tt>' (left to right) or '<tt>rtl</tt>' (right to left)
<nowiki>**</nowiki>Note: <code>body</code> is replaced by <code>frameset</code> in the Frameset <tt>DOCTYPE</tt>
Meta/Link/Style Attributes
- <tt>http-equiv</tt>/<tt>name</tt> -- used for <tt>meta</tt> tags
- <tt>content</tt> -- Used by <tt>meta</tt>
- <tt>type</tt> -- Content-Type
- <tt>rel</tt> -- Relationship to page
<nowiki>*</nowiki>Note: In the XHTML 1.0 Specification, <code>script</code> tags must use <tt>type="text/javascript"</tt> instead of <tt>language="javascript"</tt>
Common Attributes of Most Elements
- <tt>id</tt>
- <tt>style</tt>
- <tt>class</tt>
- <tt>title</tt>
<nowiki>**</nowiki>Note:The <tt>name</tt> attribute has been deprecated in XHTML Doctypes in favor of the <tt>id</tt> attribute.
Headings
- <tt>h1</tt> --Biggest/Most Important
- <tt>h2</tt>
- <tt>h3</tt>
- <tt>h4</tt>
- <tt>h5</tt>
- <tt>h6</tt> -- Smallest/Least Important (often used as a copyright notice)
Tables
Table-Specific Attributes
- <tt>cellvalign</tt> -- Replaces <tt>valign</tt> cell attribute used in HTML 4
- <tt>cellhalign</tt> -- Replaces <tt>align</tt> cell attribute used in HTML 4
- <tt>rules</tt>
- <tt>frame</tt>
- <tt>border</tt>
- <tt>summary</tt>
- <tt>width</tt>
Text
- <tt>p</tt>
Lists
Formatting
- <tt>span</tt>
- <tt>big</tt>
- <tt>strong</tt> -- Bold
- <tt>em</tt> -- Italic
- <tt>small</tt>
- <tt>u</tt> -- Underline Transitional/Frameset DOCTYPE ONLY