Controlling the size and alignment of your images using CSS keeps rules that affect the presentation of your page in the CSS and out of the HTML markup.
- By default, images are inline elements. This means that they flow within the surrounding text. In order to center an image, it should be turned into a blocklevel element using the display property with a value of block.
- Once it has been made into a block-level element, there are two common ways in which you can horizontally center an image:
- On the containing element, you can use the text-align property with a value of center.
- On the image itself, you can use the use the margin property and set the values of the
-
You can specify class names that allow any element to be centered, in the same way that you can for the dimensions or alignment of images.
-
The techniques for specifying image size and alignment of images can also be used with the HTML5 <figure> element, which you met on page 119.
- The background-image property allows you to place an image behind any HTML element. This could be the entire page or just part of the page. By default, a background image will repeat to fill the entire box.
- The path to the image follows the letters url, and it is put inside parentheses and quotes.
To wrap up the book we are going to look at some practical information that will help you launch a successful site.
SEO is a huge topic and several books have been written on the subject. The following pages will help you understand the key concepts so you can improve your website's visibility on search engines.
- Determining which keywords to use on your site can be one of the hardest tasks when you start to think about SEO. Here are six steps that will help you identify the right keywords and phrases for your site.
- Brainstorm: List down the words that someone might type into Google to find your site. Be sure to include the various topics, products or services your site is about.
- Organize: Group the keywords into separate lists for the different sections or categories of your website.
- Research: There are several tools that let you enter your keywords and then they will suggest additional keywords you might like to consider, such as: adwords.google.co.uk/ select/KeywordToolExternal (When using this tool, select the "exact match" option rather than "broad match.") www.wordtracker.com www.keyworddiscovery.com


