reading-notes

Read: 05 - HTML Images; CSS Color & Text

Images:

HTML Images Syntax In HTML, images are defined with the <img> tag. The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src attribute specifies the URL (web address) of the image: <img src="url"> The alt Attribute The alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader). If a browser cannot find an image, it will display the value of the alt attribute. The value of the alt attribute should describe the image:

Note: Always specify the width and height of an image. If width and height are not specified, the page might flicker while the image loads.

Note: border:0; is added to prevent IE9 (and earlier) from displaying a border around the image (when the image is a link).

Image Floating

HTML Screen Readers

HTML Colors

Border Color

Color Values

In HTML, colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values:

RGB Color Values

RGBA Color Values

HEX Color Values

HSL Color Values

Saturation

Lightness

The lightness of a color can be described as how much light you want to give the color, where 0% means no light (black), 50% means 50% light (neither dark nor light) 100% means full lightness (white).

HSLA Color Values

Text

Text Color

Text Color and Background Color

properity Description
text-align property is used to set the horizontal alignment of a text. A text can be left or right aligned, centered, or justified.
direction and unicode-bidi properties can be used to change the text direction of an element
vertical-align property sets the vertical alignment of an element. This example demonstrates how to set the vertical alignment of an image in a text
text-decoration property is used to set or remove decorations from text.
text-transform property is used to specify uppercase and lowercase letters in a text. It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word
text-indent property is used to specify the indentation of the first line of a text
letter-spacing property is used to specify the space between the characters in a text. The following example demonstrates how to increase or decrease the space between characters
line-height property is used to set or remove decorations from text.
word-spacing property is used to specify the space between the words in a text.
white-space property specifies how white-space inside an element is handled.
text-shadow property adds shadow to text. In its simplest use, you only specify the horizontal shadow (2px) and the vertical shadow (2px).