Outils d'utilisateurs

Outils du Site


tips:htmlcss

HTML and CSS

Various HTML and CSS snippets for quick cut 'n' paste.

Doctypes

HTML

5

<!DOCTYPE html>

4.01 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

4.01 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

4.01 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

3.2

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

XHTML

1.1

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
</html>

1.0 Strict

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

CSS

Inclusion

Within the Same File

<style type="text/css">
/* CSS */
</style>

From Another File

<link rel="stylesheet" type="text/css" href="styles/basic.css" title="Default stylesheet" media="screen" />

Horizontally centered block

.centered{
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}

HTTP Refresh

<meta http-equiv="refresh" content="300" />

A refresh http-equiv should **not** be used for redirection.

tips/htmlcss.txt · Dernière modification: 2013/11/15 05:06 (modification externe)