reading-notes

This Repo required for Asac labs class 2


Project maintained by ManarAbdelkarim Hosted on GitHub Pages — Theme by mattgraham

Chapter 5: “Images”

How to add Images?

  1. use <img> tag

  2. use src attribute which is the path or link to an image ,

optional Attributes:

  1. alt : attribute tells what is the image about .
  2. title : You can also use the title attribute with the <img>element to provide additional information about the image.

Example:

      <img src="img/teamAttack.jpg" alt="Attack On Titans" title="Attack On Titans"/> 

The Result:

Attack On Titans

Rules for Creating Images:

  1. Save images in the right format

  2. Save images at the right size

  3. Use the correct resolution

which image format should you use ?

jpeg vs jpg vs png

The effect on images :

jpeg vs jpg vs png

Chapter 11: “Color”

The color property allows you to specify the color of text inside an element.

How to specify a color ?

  1. rgb values : These express colors in terms of how much red, green and blue are used to make it up.

For example: rgb(209, 0, 0)

    <p style="color:rgb(209, 0, 0)">Hello World</p>

Hello World

  1. hex codes : These are six-digit codes that represent the amount of red, green and blue in a color, preceded by a pound or hash # sign.

For example: #6495ED

    <p style="color :#6495ED">Hello World</p>

Hello World

  1. color names : There are 147 predefined color names that are recognized by browsers.

For example: DeepPink.

    <p style="color:DeepPink">Hello World</p>

Hello World

CSS Fonts :

The CSS font properties define the font family, boldness, size, and the style of a text.

Difference Between Serif and Sans-serif Fonts:

Difference Between Serif and Sans-serif Fonts

Chapter 12: “Text”

Text in css:

For Example:

 font-family: Georgia, serif;

Hello World

For Example:

    font-size: 1.2em;

Hello World

For Example:

        @font-face {
        font-family: "Open Sans";
        src: url("/fonts/OpenSans-Regular-webfont.woff2")
         format("woff2"),
        url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
              }

For Example:

        font-weight: bold;

Hello World

For Example:

   font-style: italic;

Hello World

For Example:

     text-transform: capitalize;

Hello World

For Example:

      text-decoration: underline dotted red;

Hello World

For Example:

    line-height: 32px;

Hello World

For Example:

    letter-spacing: 1px;

Hello World

For Example:

    word-spacing: 1rem;

Hello World

For Example:

    text-align: left;

Hello World

For Example:

    vertical-align: top;

Hello World

For Example:

    text-indent: 30%;

Hello World

For Example:

 text-shadow: red 2px 5px;

Hello World

For Example:

    p::first-letter {
    font-size: 130%;
        }

For Example:

    p::first-line {
      color: red;
    }