You are on page 1of 1

BRIEF XHTML CHEAT SHEET

FORMATTING
<b>BOLD</b> (you may also see <strong>STRONG</strong>
(can also use style font-weight: bold, bolder)
<i>Italic</i> (you may also see <em>Emphasis</em>)
(can also use style font-style: italic, oblique)

TEXT STYLE with <span style="[style]"></span>


Text size "font-size: 150%;" (or 80%, etc.)
Text color "color: blue;" (or green, red etc., OR hex colors)
Background color "background-color: blue;" (etc.)
Font family "font-family: serif;" (or sans-serif, cursive, fantasy, monospace)
Text decoration: "text-decoration: underline;" (or line-through, overline)

LAYOUT & SPACING


<p>Paragraph</p>
<br /> Line break
<blockquote>Blockquote</blockquote>

ALIGNMENT
<div align="center">center</div>
<div align="right">align right</div>
<blockquote>Blockquote</blockquote>

LINKS
<a href=http://www.whatever.com>Link text</a>
To open in a new window, add target="_blank"
<a href=http://www.whatever.com target="_blank">Link text</a>

IMAGES
<img src="URL or name" />
add height="# of pixels" width="# of pixels" alt="title or name"

LISTS
<ol>
1. this <li>this</li>
2. that <li>that</li>
3. other <li>other</li>
</ol>

<ul>
• this <li>this</li>
• that <li>that</li>
• other <li>other</li>
</ul>

All tags must be nested! Wrong: <b><i>Bold and italic</b></i>


Right: <b><i>Bold and italic</i></b>

You might also like