HTML Book :
Chapter 16:: “Images”
- Where the
<img>elements appear in the HTML, rather than using width and height attributes you can use these names as values for the class attribute :- small
- medium
- large
- Aligning images Using CSS :
- The float property is added to the class that was created to represent the size of the image.
- New classes are created with names such as align-left or align-right to align the images to the left or right of the page. These class names are used in addition to classes that indicate the size of the image.
- Centering images Using CSS :
- By default, images are inline elements.
- 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 left and right margins to auto.
- By default, images are inline elements.
- Background Images background-image :
p {background-image: url("images/pattern.gif");}- repeat : The background image is repeated both horizontally and vertically (the default way it is shown if the background repeat property isn’t used).
- repeat-x The image is repeated horizontally only
- repeat-y The image is repeated vertically only.
- no-repeat The image is only shown once.
- fixed The background image stays in the same position on the page.
- scroll The background image moves up and down as the user scrolls up and down the page.
- background-position
- left top
- left center
- left bottom
- center top
- center center
- center bottom
- right top
- right center
- right bottom
- You can specify the dimensions o XX f images using CSS. This is very helpful when you use the same sized images on several pages of your site.
- Images can be aligned both horizontally and vertically using CSS.
- You can use a background image behind the box created by any element on a page.
- Background images can appear just once or be repeated across the background of the box.
- You can create image rollover effects by moving the background position of an image.
- To reduce the number of images your browser has to load, you can create image sprites.
Chapter 19 :: “Practical Information”
On-Page SEO
In every page of your website there are seven key places where keywords :
-
Page Title The page title appears at the top of the browser window or on the tab of a browser. It is specified in the
element which lives inside the <head> element. -
URL / Web Address The name of the file is part of the URL. Where possible, use keywords in the file name.
-
Headings If the keywords are in a heading
element then a search engine will know that this page is all about that subject and give it greater weight than other text. -
Text Where possible, it helps to repeat the keywords in the main body of the text at least 2-3 times. Do not, however, over-use these terms, because the text must be easy for a human to read.
-
Link Text Use keywords in the text that create links between pages.
-
Image Alt Text Search engines rely on you providing accurate descriptions of images in the alt text. This will also help your images show up in the results of image-based searches.
-
Page Descriptions The description also lives inside the <head> element and is specified using a tag. It should be a sentence that describes the content of the page. (These are not shown in the browser window but they may be displayed in the results pages of search engines.)
How to Identify Keywords and Phrases
- 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.
- Compare It is very unlikely that your site will appear at the top of the search results for every keyword. This is especially true for topics where there is a lot of competition.
- Refine Now you need to pick which keywords you will focus on. These should always be the ones that are most relevant to each section of your site.
- Map Now that you have a refined list of keywords, you know which have the most competition, and which ones are most relevant, it is time to start picking which keywords you will use for each page.
- Search engine optimization h XX elps visitors find your sites when using search engines.
- Analytics tools such as Google Analytics allow you to see how many people visit your site, how they find it, and what they do when they get there.
- To put your site on the web, you will need to obtain a domain name and web hosting.
- FTP programs allow you to transfer files from your local computer to your web server.
- Many companies provide platforms for blogging, email newsletters, e-commerce and other popular website tools (to save you writing them from scratch).