<!-- CSS:Basics snippet 7. -->
<!-- Block and inline elements default display. -->
<!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" xml:lang="en" lang="en">
<!-- Code source: http://www.justfigures.co.uk/ -->
<!-- A resource for web developers using XHTML, CSS, JavaScript, PHP -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View snippet page</title>
<style type="text/css">
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 20px;
color: #000000;
background-color: #3399FF;
}
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #000000;
background-color: #6699FF;
}
ul {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #000000;
background-color: #66FFFF;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #000099;
text-decoration:underline;
background-color: #66FFFF;
}
</style>
</head>
<body>
<h1>A block element will display over the full width of the space available to it.</h1>
<h1>As this header demonstrates.</h1>
<p>Similar behaviour for a paragraph.</p>
<ul>
<li>Contents of lists are also displayed as a block</li>
<li>Contents of lists are also displayed as a block</li>
</ul>
<a href="#">Hyperlinks (anchors) however display as an inline element</a>
<a href="#">Inline element</a>
<a href="#">Inline element</a>
<p>As do the elements for <strong>bold style text: strong</strong> and <em>italic style text: emphasis</em>.</p>
</body>
</html>