reading-notes

View on GitHub

HTML Images, Colors, Text

Images

adding images in the right way to a web page it will make it look attractive and professional.
to add images to web page, img tag is used. NOTE: img tag has no content, so that it does not need closing tag.
There are more than one way to add an image:

width and height properties are used to control the size of the image.

Colors

colors can be applied for the text or the background of an element.
colors is changes using css, inline or using selectors.

to change text color, use the color property in css. As shown below:

<h2 style = "color:red">Warning!</h2>

to change background color, use the background-color property in css. As shown below:

    <body style="background-color:gray">
    .
    .
    .
    </body>

since color are limited by their names, css offers many ways to specify colors.

h1{
    color:#00ff00;
}

in this method each part need id different in specifying the colors, for example the hue represents the color as an angle with values range from 0 to 360.
the saturation represents colors as percentage.
the lightness also use percentage to specify color, where 0% is white, 50% is normal and 100% is black.

h1{
    background-color: hsl(128, 100%, 50%);
}

there is also similar property to hsl with transparency which is hsla where the value ranges form 0 to 1:

h2{
    background-color: hsla(128, 100%, 50%, 0.5);
}

Text

css offers plenty properties to style texts.
to change the text font, use font-family property. NOTE: the font of this page will changes to cursive by changing the text font in body, and since markdown supports html, the text font will change.

html

font-weight will change the appearance of the text, to be bold, font-style to choose which from style (italic, normal, oblique) to choose, and the font-size will change the text size as desired. For example:

h1{
    font-weight: bold;
    font-style: italic;
    font-size: 36px;
}

to change the text to capital or to small, use text-transform, with either uppercase or lowercase values, and text-align property aligns the text as desired in the page. For example to make all the text inside h1 capital and centered in the middle of the page:

h1{
    text-transform: uppercase;
    text-align: center;
}

another interesting property to style text is text-shadow property, to see how the effect id please visit this link Shoes Factory, and see the website name and the prices.