code-201-reading-notes

read05

images

There are many reasons why you might want to add an image to a web page: you might want to include a logo, photograph, illustration, diagram, or chart.

Images should…

storig images on your site

If you are building a site from scratch, it is good practice to create a folder for all of the images the site uses.

adding images

addingimages

To add an image into the page you need to use an () element. This is an empty element (which means there is no closing tag). It must carry the following two attributes:

height and width of images

You will also often see an element use two other attributes that specify its size:

three rules for creating images

  1. Save images in the right format; like jbeg, gif, and png
  2. Save images at the right size
  3. Use the correct resolution

figure and figure caption in HTML5

Color

colors

There are several ways to use the colors in CSS, like the color name, RGB, RGBA, HEX, HEXA, HSL, and HSLA.

Text

Typeface Terminology

  1. serif : Serif fonts have extra details on the ends of the main strokes of the letters. These details are known as serifs. Exaples; Georgia, Times, Times New Roman
  2. sans-serif : Sans-serif fonts have straight ends to letters, and therefore have a much cleaner design. Exaples; Arial, Verdana, Helvetica
  3. monsoace : Every letter in a monospace (or fixed-width) font is the same width. (Non-monospace fonts have different widths.)

specifying typefaces

The font-family property allows you to specify the typeface that should be used for any text inside the elemen (s) to which a CSS rule applies. The value of this property is the name of the typeface you want to use.

size of type

The font-size property enables you to specify a size for the font. There are several ways to specify the size of a font. The most common are; pixels, percentages, and ems.

Bold

The font-weight property allows you to create bold text. There are two values that this property commonly takes;normal: This causes text to appear at a normal weight. bold: This causes text to appear bold.

italic

If you want to create italic text, you can use the font-style property. There are three values this property can take:normal:This causes text to appear in a normal style. italic: This causes text to appear italic. oblique: This causes text to appear oblique.

UpperCase & LowerCase

The text-transform property is used to change the case of text giving it one of the following values; uppercase: This causes the text to appear uppercase. lowercase: This causes the text to appear lowercase.capitalize: This causes the first letter of each word to appear capitalized.

underline and strike

The text-decoration property allows you to specify the following values:

  1. none :This removes any decoration already applied to the text.
  2. underline: This adds a line underneath the text.
  3. overline: This adds a line over the top of the text.
  4. line-through: This adds a line through words.
  5. blink: This animates the text to make it flash on and off.

alighnment

The text-align property allows you to control the alignment of text. The property can take one of four values:

  1. left: This indicates that the text should be left-aligned.
  2. right: This indicates that the text should be right-aligned.
  3. center: This allows you to center text.
  4. justify: This indicates that every line in a paragraph, except the last line, should be set to take up the full width of the containing box.

Browsers tend to show links in blue with an underline by default, and they will change the color of links that have been visited to help users know which pages they have been to.

responding to users

JBEG VS PNG VS GIF