0% found this document useful (0 votes)
38 views

HTML XHTML Cheatsheet

This document provides a cheat sheet of common HTML and XHTML elements including how to add a doctype, link a stylesheet, add meta tags, create tables, frames, forms, lists and more. It offers examples of the code needed for elements like headers, paragraphs, links, images, lists and more to build basic HTML pages and documents.

Uploaded by

Giova Rossi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

HTML XHTML Cheatsheet

This document provides a cheat sheet of common HTML and XHTML elements including how to add a doctype, link a stylesheet, add meta tags, create tables, frames, forms, lists and more. It offers examples of the code needed for elements like headers, paragraphs, links, images, lists and more to build basic HTML pages and documents.

Uploaded by

Giova Rossi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HTML & XHTML CheatSheet

HTML 4 Transitional Doctype


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

XHTML Transitional Doctype


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

XHTML Strict Doctype


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

Link a StyleSheet
<link rel="stylesheet" href="/style.css" type="text/css" />

RSS Autodiscovery
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/rss.xml"
/>

META Description
<meta name="description" content="About a Page" />

META Keywords
<meta name="keywords" content="go, here" />

Table

1/3
<table>

<tr>

<th>Header A</th>

<th>Header B</th>

</tr>

<tr>

<td>A One</td>

<td>B One</td>

</tr>

<tr>

<td>A Two</td>

<td>B Two</td>

</tr>

</table>

Left & Right Frames


<frameset cols="25%,75%">

<frame src="left.html" />

<frame src="right.html" />

</frameset>

Top & Bottom Frames


<frameset rows="10%,90%">

<frame src="top.html" />

<frame src="bottom.html" />

</frameset>

File Upload
<form method="post" enctype="multipart/form-data" action="/up">

<input type="file" name="file_name" />

</form>

Option Select List


<select name="fruit">

<option value="1" selected="selected">Apple</option>

<option value="2">Orange</option>

</select>

Abbreviation
<abbr title="United States">US</abbr>

Definition

2/3
<dl>

<dt>Word</dt>

<dd>Definition</dd>

</dl>

Ordered / Numbered List

<ol>

<li>One</li>

<li>Two</li>

</ol>

Bullet List

<ul>

<li>One</li>

<li>Two</li>

</ul>

Basic HTML

Link to another page

<a href="http://spendfish.com/">Text for link</a>

3/3

You might also like