reading-notes

Duckett HTML

Ch 16 p406-427

Images

commonly used image sizes are:

float property

There are 2 ways to use the float property

  1. The float property is added to the class that was created to represent the size of the image

  2. 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.

It is also common to add a margin to the image to ensure that the text does not touch their edges.

Centering Images with CSS

Images are inline elements by default.

In order to center an image, it should be turned into a blocklevel element using the display property with a value of block.

2 Common ways to horizontally center an image

  1. On the containing element, you can use the text-align property with a value of center.

  2. On the image itself, you can use the use the margin property and set the values of the left and right margins to auto.

This can also be used for the <figure> element

Background Images

<background-image>

Repeating Images

background-repeat background-attachment

The background-repeat property can have 4 values:

repeat - The background image is repeated both horizontally and vertically

repeat-x - The image is repeated horizontally only

repeat-y - The image is repeated vertically only

no-repeat - The image is only shown once

the background-attachment property specifies whether a background image should stay in one position or move as the user scrolls up and down the page. It can have one of two values:

fixed -the image stays in the same position on the page

scroll - The image moves up and down as the user scrolls up and down the page

Background Position

background-position

background-position - specifies where in the browser window the background image should be placed.

Shorthand

background

  1. background-color
  2. background-image
  3. background-repeat
  4. background-attachment
  5. background-position

Image Rollovers and Sprites

rollover - a link or button that changes to a second style when a user moves their mouse over it

page 418 ducket html shows the steps to create a rollover

Ch 19 p476-492

Practical information

Search Engine Optimization (SEO)

search engine optimization - the practice of trying to help your site appear nearer the top of search engine results when people look for the topics that your website covers.

on-page techniques - the methods you can use on your web pages to improve their rating in search engines.

  1. page title
  2. url/web address
  3. headings
  4. text
  5. link text
  6. image alt text
  7. page descriptions

off-page techniques - determining how to rank your site by looking at the other sites that link to yours

Flash is no longer supported but the reading pages were bookmarked just in case.

https://deannaj401.github.io/reading-notes/