With
HTML 4, centering the contents within a
div is simple. You
just use <div align="center">
. E.g., if I wanted to
center the image and text below on a webpage, I could use the following
code:
<div align="center"> <img src="186px-Antinous_Mandragone_profil.jpg" alt="Antinous Mangragone profile"><br> <a href="https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg"> Antinous Mandragone</a> </div>
The image would then be displayed in browsers as seen below:
[ More Info ]