Image float: left : img float « Tags « HTML / CSS






Image float: left

      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>A table of hcards</title>
<style type="text/css">
img {
  border: 1px solid black;
  float: left;
  margin-right: 5px;
}
</style>
</head>

<body>
<p class="vcard"><img src="http://www.java2s.com/style/logo.png" alt="" class="photo" />
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. </p>

</body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.Image float left, (text wrap)
2.Image floating left and right
3.Image floating right
4.Image floating with text
5.Image floating left
6.Image floating right 2
7.Image floating right, left
8.Floating the image allows the text to flow around it
9.Text floating around image
10.Two image float left and right separately
11.Image floating to left
12.Image Floating right 3
13. floating to right with image
14.Image float and text wraping