CSS
Mohamed Loey
Agenda
Part I: Introduction
Part II: CSS
Part III: CSS Properties
Agenda
Part I: Introduction
 What is CSS?
 History of CSS
 Advantages of CSS
What is CSS?
• CSS stands for Cascading Style Sheets
• Styles define how to display HTML elements
• External Style Sheets can save a lot of work
History of CSS
• CSS was proposed in 1994 as a web styling language.
To helps solve some of the problems HTML.
• There were other styling languages proposed at this
time, such as Style Sheets for HTML but CSS won.
• CSS2 became the recommendation in 1998 by W3C
• CSS3 was started in 1998 but it has never been
completed. Some parts are still being developed and
some components work on some browsers.
Advantages of CSS
• Saves time
• Easy to change
• Give you more
control over layout
• Make it easy to create
a common format for
all the Web pages
Agenda
Part II: CSS
 CSS Syntax
 Inserting CSS
 CSS Selectors
CSS Syntax
inserting CSS
• Three Ways to Insert CSS:
1. Inline style
2. Internal style sheet
3. External style sheet
Inline style
• An inline style loses many of the advantages of a
style sheet
Inline style
• On Chrome Browser:
Internal style sheet
• An internal style sheet should be used when a single
document has a unique style.
• You define internal styles in the head section of an
HTML page, inside the <style> tag.
Internal style sheet
• Example :
External style sheet
• An external style sheet is ideal when the style is
applied to many pages.
• With an external style sheet, you can change the look
of an entire Web site by changing just one file.
• Each page must include a link to the style sheet with
the <link> tag. The <link> tag goes inside the head
section
External style sheet
• An external style sheet can be written in any text
editor.
• The style sheet file must be saved with a .css
extension.
• "myStyle.css":
CSS Selectors
• CSS selectors allow you to select and manipulate
HTML element(s).
• CSS Selectors Consist of:
1. The element Selector
2. The id Selector
3. The class Selector
4. Grouping Selectors
The element Selector
• The element selector selects elements based on the
element name.
• Example:
The id Selector
• The id selector uses the id attribute of an HTML tag
to find the specific element.
• Example:
The class Selector
• The class selector finds elements with the specific
class.
• Example:
Grouping Selectors
• To minimize the code, you can group selectors.
• Example:
Agenda
Part II: CSS Properties
 CSS Text
 CSS Font
 CSS Backgrounds
 CSS Links
CSS Text
• Color
• Text Align
• Text Decoration
• Text Transform
Color
color: value;
• Possible values are:
1. a HEX value - like "#ff0000"
2. an RGB value - like "rgb(255,0,0)"
3. a color name - like "red"
Example
Text Color
text-align: value;
• Possible values are:
1. left
2. right
3. center
4. justify
Example
Text Decoration
text-decoration: value;
• Possible values are:
1. none
2. underline
3. overline
4. line through
5. blink
Example
Text Transform
text-transform: value;
• Possible values are:
1. none
2. capitalize
3. lowercase
4. uppercase
Example
Text Indent
text-indent: value;
• Possible values are:
1. length
2. percentage
Example
CSS Font
• Font
• Font-Family
• Font Size
• Font Style
Font
font: value;
• Possible values are:
1. size
2. type
Example
Font-Family
font-family: value;
• There are 2 choices for values:
1. family-name
2. generic family
Example
Font Size
font-size: value;
• There are a lot of choices for values:
• xx-large, x-large, larger, large
• medium, small
• Smaller, x-small ,xx-small
• length
• % (percent)
Example
Font Style
font-style: value;
• Possible values are
1. normal
2. italic
3. oblique
Example
CSS Backgrounds
• Background Color
• Background Image
Background Color
background-color: value;
• Possible values:
1. color name
2. hexadecimal number
3. RGB color code
4. transparent
Example
Background Image
background-image: url(path_to_image);
• Possible Values:
1. url
2. none
Example
CSS Links
• Links can be styled with any CSS property (e.g. color,
font-family, background, etc.).
• In addition, links can be styled differently depending on
what state they are in.
• The four links states are:
1. a:link - a normal, unvisited link
2. a:visited - a link the user has visited
3. a:hover - a link when the user mouses over it
4. a:active - a link the moment it is clicked
CSS Links
• Example:
THANK U

More Related Content

PPSX
HTML Comprehensive Overview
PPT
Introduction to Cascading Style Sheets (CSS)
PDF
Introduction to HTML5
PPT
Introduction to Javascript
PPTX
Form using html and java script validation
PDF
JavaScript - Chapter 12 - Document Object Model
PPTX
HTML Comprehensive Overview
Introduction to Cascading Style Sheets (CSS)
Introduction to HTML5
Introduction to Javascript
Form using html and java script validation
JavaScript - Chapter 12 - Document Object Model

What's hot (20)

PPTX
PHP Form Validation Technique
PPTX
Dom(document object model)
PPT
JavaScript: Events Handling
PPTX
Css box-model
PPTX
Flexbox
ODP
CSS Basics
PPTX
An Introduction to the DOM
PDF
Javascript basics
PDF
Intro to html revised2
PDF
JavaScript - Chapter 11 - Events
PPTX
Event In JavaScript
PPTX
(Fast) Introduction to HTML & CSS
PDF
JavaScript - Chapter 10 - Strings and Arrays
PDF
Basic Details of HTML and CSS.pdf
PPTX
Learn html Basics
PPTX
Css Complete Notes
PDF
JavaScript - Chapter 5 - Operators
PPTX
jQuery
PPTX
html-table
PDF
Basic Html Notes
PHP Form Validation Technique
Dom(document object model)
JavaScript: Events Handling
Css box-model
Flexbox
CSS Basics
An Introduction to the DOM
Javascript basics
Intro to html revised2
JavaScript - Chapter 11 - Events
Event In JavaScript
(Fast) Introduction to HTML & CSS
JavaScript - Chapter 10 - Strings and Arrays
Basic Details of HTML and CSS.pdf
Learn html Basics
Css Complete Notes
JavaScript - Chapter 5 - Operators
jQuery
html-table
Basic Html Notes
Ad

Similar to CSS Comprehensive Overview (20)

PPTX
Web Development - Lecture 5
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
basic programming language AND HTML CSS JAVApdf
PPTX
BITM3730 9-20.pptx
PPTX
BITM3730 9-19.pptx
PPTX
CSS Introduction
PPTX
Cascading style sheet an introduction
PPTX
cascadingstylesheets,introduction.css styles-210909054722.pptx
PPTX
Cascading style sheets
PPTX
Castro Chapter 8
PPTX
Cascading style sheets
PPTX
PPTX
Ia css
PPTX
BITM3730Week4.pptx
PDF
PPTX
WEB TECHNOLOGY Unit-2.pptx
Web Development - Lecture 5
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
basic programming language AND HTML CSS JAVApdf
BITM3730 9-20.pptx
BITM3730 9-19.pptx
CSS Introduction
Cascading style sheet an introduction
cascadingstylesheets,introduction.css styles-210909054722.pptx
Cascading style sheets
Castro Chapter 8
Cascading style sheets
Ia css
BITM3730Week4.pptx
WEB TECHNOLOGY Unit-2.pptx
Ad

More from Mohamed Loey (20)

PDF
Lecture 6: Deep Learning Applications
PDF
Lecture 5: Convolutional Neural Network Models
PDF
Lecture 4: Deep Learning Frameworks
PDF
Lecture 4: How it Works: Convolutional Neural Networks
PPTX
Lecture 3: Convolutional Neural Networks
PDF
Lecture 2: Artificial Neural Network
PDF
Lecture 1: Deep Learning for Computer Vision
PDF
Design of an Intelligent System for Improving Classification of Cancer Diseases
PDF
Computer Security - CCNA Security - Lecture 2
PDF
Computer Security - CCNA Security - Lecture 1
PDF
Algorithms Lecture 8: Pattern Algorithms
PDF
Algorithms Lecture 7: Graph Algorithms
PDF
Algorithms Lecture 6: Searching Algorithms
PDF
Algorithms Lecture 5: Sorting Algorithms II
PDF
Algorithms Lecture 4: Sorting Algorithms I
PDF
Algorithms Lecture 3: Analysis of Algorithms II
PDF
Algorithms Lecture 2: Analysis of Algorithms I
PDF
Algorithms Lecture 1: Introduction to Algorithms
PDF
Convolutional Neural Network Models - Deep Learning
PDF
Deep Learning - Overview of my work II
Lecture 6: Deep Learning Applications
Lecture 5: Convolutional Neural Network Models
Lecture 4: Deep Learning Frameworks
Lecture 4: How it Works: Convolutional Neural Networks
Lecture 3: Convolutional Neural Networks
Lecture 2: Artificial Neural Network
Lecture 1: Deep Learning for Computer Vision
Design of an Intelligent System for Improving Classification of Cancer Diseases
Computer Security - CCNA Security - Lecture 2
Computer Security - CCNA Security - Lecture 1
Algorithms Lecture 8: Pattern Algorithms
Algorithms Lecture 7: Graph Algorithms
Algorithms Lecture 6: Searching Algorithms
Algorithms Lecture 5: Sorting Algorithms II
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 3: Analysis of Algorithms II
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 1: Introduction to Algorithms
Convolutional Neural Network Models - Deep Learning
Deep Learning - Overview of my work II

Recently uploaded (20)

PDF
Child-friendly e-learning for artificial intelligence education in Indonesia:...
PDF
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
PDF
Rooftops detection with YOLOv8 from aerial imagery and a brief review on roof...
PPTX
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
PDF
Gestión Unificada de los Riegos Externos
PPTX
Blending method and technology for hydrogen.pptx
PDF
Domain-specific knowledge and context in large language models: challenges, c...
PDF
Secure Java Applications against Quantum Threats
PDF
ment.tech-How to Develop an AI Agent Healthcare App like Sully AI (1).pdf
PPTX
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PDF
Introduction to c language from lecture slides
PDF
The Basics of Artificial Intelligence - Understanding the Key Concepts and Te...
PDF
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
PDF
Altius execution marketplace concept.pdf
PDF
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf
PDF
Intravenous drug administration application for pediatric patients via augmen...
PDF
Human Computer Interaction Miterm Lesson
PPT
Overviiew on Intellectual property right
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Child-friendly e-learning for artificial intelligence education in Indonesia:...
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
Rooftops detection with YOLOv8 from aerial imagery and a brief review on roof...
Strategic Picks — Prioritising the Right Agentic Use Cases [2/6]
Gestión Unificada de los Riegos Externos
Blending method and technology for hydrogen.pptx
Domain-specific knowledge and context in large language models: challenges, c...
Secure Java Applications against Quantum Threats
ment.tech-How to Develop an AI Agent Healthcare App like Sully AI (1).pdf
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
Ebook - The Future of AI A Comprehensive Guide.pdf
Introduction to c language from lecture slides
The Basics of Artificial Intelligence - Understanding the Key Concepts and Te...
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
Altius execution marketplace concept.pdf
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf
Intravenous drug administration application for pediatric patients via augmen...
Human Computer Interaction Miterm Lesson
Overviiew on Intellectual property right
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf

CSS Comprehensive Overview