Adding caption to Image
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Caption</title>
<style>
body {
font-size: 62.5%;
margin: 0;
padding: 0;
}
#content {
margin-left: 15px;
margin-top: 15px;
border: 1px dashed #999;
border-right: none;
border-bottom: none;
}
h1 {
font: normal 2.4em Verdana, Arial, Helvetica, sans-serif;
margin: 0;
border-bottom: 1px dashed #999;
padding: 5px 0 5px 8px;
color: #14556b;
}
p {
font: 1.6em/160% Georgia, "Times New Roman", Times, serif;
margin: 10px 8px;
}
.copyright {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1em;
text-transform: uppercase;
color: #666666;
margin-left: 0;
padding-left: 8px;
border-top: 1px dashed #999;
clear: both;
}
.figure img {
border: 1px solid #666;
padding: 10px;
}
.figure {
float: right;
width: 222px;
margin: 15px 10px 5px 10px;
}
.figure p {
font: bold 1em/normal Verdana, Arial, Helvetica, sans-serif;
color: #333;
text-align: center;
background-color: #e6f3ff;
border: 1px dashed #666;
padding: 5px;
margin: 10px 0 0 0;
}
</style>
</head>
<body>
<div id="content">
<h1>CosmoFarmer’s Guide to Apartment Lawn Maintenance </h1>
<div class="figure">
<img src="http://www.java2s.com/style/logo.png" alt="Creeping Bentgrass" width="200"
height="200" />
<p>Figure 1: This is a caption.</p>
</div>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tatio. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure.</p>
<p class="copyright">Copyright 2006, CosmoFarmer.com </p>
</div>
</body>
</html>
Related examples in the same category