The img
tag is okay. The center
tag is obsolete since about 1867. But you can easily use text-align: center
as a style on the parent element of the logo.
So with a piece of HTML like this:
<div class="logo"><img src="..."></div>
and a piece of CSS like this:
.logo {
text-align: center;
}
.logo img {
width: 50%;
}
You should have a centered logo of about half the width of the page.
There is no shame in using the img
tag, and in fact, if you want to scale, then it's very convenient to have this. An image will automatically scale its height relatively according to its width. There is no easy way to get the same effect using just a background image.
Alternatively, you can make the logo a background. But then you'll have to specify the height of the container, because it doesn't have any content at all and will otherwise collapse:
.logo {
text-align: center;
background-color: red;
background-image: url('http://jsfiddle.net/img/logo.png');
background-size: contain;
background-position: 50% 0;
background-repeat: no-repeat;
height: 100px;
}