<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://thebestlinux.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Center_an_Image_on_Your_Page</id>
	<title>How to Center an Image on Your Page - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://thebestlinux.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Center_an_Image_on_Your_Page"/>
	<link rel="alternate" type="text/html" href="https://thebestlinux.com/index.php?title=How_to_Center_an_Image_on_Your_Page&amp;action=history"/>
	<updated>2026-05-01T18:04:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://thebestlinux.com/index.php?title=How_to_Center_an_Image_on_Your_Page&amp;diff=947&amp;oldid=prev</id>
		<title>Jamie: Created page with &quot;= Simple Way to Center an Image in HTML = Although this method uses CSS to achieve the desired results, this is used so often that I prefer to have it as one of my top tips an...&quot;</title>
		<link rel="alternate" type="text/html" href="https://thebestlinux.com/index.php?title=How_to_Center_an_Image_on_Your_Page&amp;diff=947&amp;oldid=prev"/>
		<updated>2021-01-16T10:28:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Simple Way to Center an Image in HTML = Although this method uses CSS to achieve the desired results, this is used so often that I prefer to have it as one of my top tips an...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Simple Way to Center an Image in HTML =&lt;br /&gt;
Although this method uses CSS to achieve the desired results, this is used so often that I prefer to have it as one of my top tips and categorize it in the HTML section instead of the CSS section!  Often, I just want to slap together a simple quick page for a friend with a photo that has some meaning to us.  In the past, I used to use tables to center items on a web page, but this method involves less lines of code to achieve the desired results.&lt;br /&gt;
&lt;br /&gt;
I'll include the basic HTML formatting lines, and use dots(.) on 3 blank lines to indicate possible multiple lines of code before and after.&lt;br /&gt;
&lt;br /&gt;
Here's the code:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:blue&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot; lang=&amp;quot;EN&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;&lt;br /&gt;
Web Page Title&lt;br /&gt;
&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.center {&lt;br /&gt;
display: block;&lt;br /&gt;
margin-left: auto;&lt;br /&gt;
margin-right: auto;&lt;br /&gt;
width: 50%;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;img src=&amp;quot;ImageFileName.jpg&amp;quot; alt=&amp;quot;ImageDescription&amp;quot; class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, it's pretty simple.  Of course you will need to insert your own text where obviously appropriate!&lt;br /&gt;
&lt;br /&gt;
Hope you find this helpful.  I know I use this method all the time, and it's easily modifiable to suite your needs.&lt;/div&gt;</summary>
		<author><name>Jamie</name></author>
	</entry>
</feed>