it will help you to know about JavaScript, Summaries of Technology

it will help you know about web development and make you very good in design

Typology: Summaries

2022/2023

Uploaded on 02/28/2023

emad-selkhi
emad-selkhi 🇵🇸

5 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PART 5
INTRODUCTION TO CSS
PREPARED BY: ENG. SAMER HUWARI
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download it will help you to know about JavaScript and more Summaries Technology in PDF only on Docsity!

PART 5

INTRODUCTION TO CSS

PREPARED BY: ENG. SAMER HUWARI

INTRODUCTION

  • What is CSS
  • CSS Syntax
  • CSS Selectors
  • Basic Selectors
  • Examples
  • Applying CSS to HTML

CSS SYNTAX

  • Generally, a CSS syntax consists of:
    • Selector: the HTML element to style.
    • Property: the styling property.
    • Value: styling property value.
  • For example, if we want to change the color of all elements in the HTML

document to white, the syntax will be:

selector{ property: value; property: value; } h1{ color: white; }

CSS SELECTORS

  • A CSS selector selects the HTML element(s) you want to style.
  • There different types of selectors:
    • Simple (basic) selectors : using element id, class name, or tag
    • Combinator selectors : select elements based on a specific relationship between

them.

  • Pseudo-class selectors : select elements based on a certain state.
  • Pseudo-elements selectors : Select and style a part of an element.
  • Attribute selectors: select elements based on an attribute or attribute value.

EXAMPLES

MacBook Pro

Lorem ipsum dolor sit.

3290.95$ More Info

// What elements are targeted? #product{} #product > span {} #product span {} div > span {} .product-title + .product-desc {}

APPLYING CSS TO HTML

  • There are three ways of inserting a style sheet:.
    • External CSS (lowest priority): via using the in the
    • Internal CSS: using the