<html>
<head>
<title>Left float and right float</title>
<style type="text/css">
.leftFloat {
float: left
}
.rightFloat {
float: right
}
p {
clear: left;
}
</style>
</head>
<body>
<img src="http://www.java2s.com/style/logo.png" class="leftFloat" alt="cover" />
<p>This is the book cover for the <em>CSS</em>.</p>
<img src="http://www.java2s.com/style/logo.png" class="rightFloat" alt="cover"/>
<p>This is the book cover for the <em>CSS</em>.</p>
</body>
</html>