Page Widget How to - Place Text and an Image next to each other








Question

We would like to know how to place Text and an Image next to each other.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
img {<!--from   w w w.  j  a va  2 s .c  om-->
  float: left;
}

h3 {
  float: left;
}
</style>
</head>
<body>
  <img src="http://www.java2s.com/style/download.png" height="75" width="235" />
  <h3>The Art of Gaming</h3>
</body>
</html>

The code above is rendered as follows: