SlideShare a Scribd company logo
hasen@microcis.net July 01, 2013Hassen poreya
Trainer, Cresco Solution
Afghanistan Workforce
Development Program
HTML / CSS
Divisions
 As defined in the HTML 4.01 and XHTML 1.0
standards, the <div> tag divides your document
into separate, distinct sections.
 In fact you can organize and position your objects
on the document with divisions (<div>).
 A div is nothing more but a container, Similar to
tables, but much more lighter and useful.
 Older websites were using tables to position and
organize the objects, that was complex as well as
much more slower than the divisions.
 Today’s websites are using division.
Divisions
 Inner divs comes inside another (outer) div to split
up the outer div.
 You define a size for each div and place it
somewhere in your document, and then put your
contents inside the div.
 The basic syntax is like:
<div>
…
<div>
</div>
…
</div>
CSS ( Cascading Style Sheet)
CSS
 Stands for Cascading Style Sheet.
 Added to HTML 4.0 to solve a problem.
 It separates structure from layout.
 Define how to display HTML elements.
 Reduces size of HTML file.
 Multiple style definitions will cascade into one.
CSS Syntax
 The CSS syntax is made up of three parts:
 Selector: The selector is normally the HTML
element/tag
 Property
 Value
selector {property: value}
h1 {color: blue;}
.p {font-size: 12px;}
Selector
 There are three kind of selectors
 Group selector
 Class selector
 Id selector
Group Selector
 You can set a style for a group of HTML elements.
 Separate selectors from each other by a comma.
h1,h2,h3,h4,h5,h6 {color: green;}
or
p, h4, title {text-align:right;}
Class Selector
 define different styles for the same type of HTML
element
 CSS Syntax
p.center {text-align: center}
 class attribute in HTML document:
<p class="center">
This paragraph will be center
</p>
Class Selector
 Apply more than one class per given element.
 CSS Syntax
.center {text-align: center}
 Class attribute in HTML document:
<p class="center">
This paragraph will be center
</p>
<h1 class="center">
This heading will be center
</h1>
Id Selector
 The id selector is defined as a #
 CSS Syntax
#center {text-align: center}
 Idattribute in HTML document:
<p id="center">Paragraph in center</p>
<h1 id="center">
This heading will be center
</h1>
Inserting CSS to HTML
 There are three ways of inserting a style sheet into
a HTML document.
 Inline Styles
 Internal Style Sheet
 External Style Sheet
Inline CSS
 Style is to be applied to a single occurrence of an
element.
 In fact, HTML style attribute comes inside a tag and
hold your CSS definitions.
<p style="color:sienna; margin-left:20px">
This is a paragraph
</p>
Internal CSS
 You can define internal styles in the head section
by using the <style> tag.
<head>
<style type="text/css">
p {margin-left: 20px}
body{backgroun image:url(“me.jpg")
</style>
</head>
External CSS
 You can write all CSS code in one file and save it as “style.css”
and then you can link this to your HTML document.
 By doing this, you can bring changes in CSS file and then
everything automatically will be change in your HTML
document.
 CSS File – style.css
p {margin-left: 20px}
 HTML File
<head>
<link rel="stylesheet” type="text/css” href=“style.css"/>
</head>
Basic style properties
Background-color: value;
Background-image: value;
Font-family: value;
Font-size: value;
Float: value;
Text-align: value;
Color: value;
Width: value;
Height: value;
CSS Backgrounds
 CSS properties used for background effects:
 background-color (Color)
 background-image (Image URL)
 background-repeat (Repeat to X and Y)
 background-attachment (Fixed or Scroll)
 background-position (top, right, left, bottom)
CSS Backgrounds
 body {background-color:#b0c4de;}
 p {background-color:#e0ffff;}
 body {background-image:url(‘microcis.png');}
 Body{ background-image:url('gradient.png');
background-repeat:repeat-x;}
 Body{ background-image:url(‘logo.png');
background-repeat:no-repeat;
background-psition:right top;}
Shorthand style:
body {background:#fff url('img_tree.png') no-repeat right top;}
Order:
background-color, background-image, background-repeat, background-attachment
background-position
CSS Text Style
 Some CSS properties used to style the texts.
 Color (Text color)
 Direction (left to right, right to left)
 Text-align (left, center, right)
 Text-decoration (Underline, overline, …)
 Text-transform (uppercase, lowercase)
 Text-indent (pixels)
 Letter-spacing (pixels)
 Word-spacing (pixels)
CSS Text Style
h1 {color:#00ff00;}
h2 {color:rgb(255,0,0);}
p.date {text-align:right;}
a {text-decoration:none;}
h1 {text-decoration:overline;}
h2 {text-decoration:line-through;}
h3 {text-decoration:underline;}
h4 {text-decoration:blink;}
p.uppercase {text-transform:uppercase;}
p.capitalize {text-transform:capitalize;}
p {text-indent:50px;}
CSS Link Style
 Almost any CSS property can be attached to links.
 color, font-family, background, dir, margin, text-
decoration, …
a:link – a normal, unvisited link
a:visited – a visited link
a:hover – react on mouse over
a:active – a link the moment it is clicked
CSS Link Style
a:link {color:#FF0000;}
a:visited {color:#00FF00;}
a:hover {color:#FF00FF;}
a:active {color:#0000FF;}
-------------------------------------
a:link {text-decoration:none;}
a:visited {text-decoration:none;}
a:hover {text-decoration:underline;}
a:active {text-decoration:underline;}
CSS List Style
 The CSS list properties allow you to:
 Set different list item markers for ordered lists.
 Set different list item markers for unordered lists.
 Set an image as the list item marker.
ul.a {list-style-type: circle;}
ul.b {list-style-type: square;}
ol.c {list-style-type: upper-roman;}
ol.d {list-style-type: lower-alpha;}
--
Ul{ list-style-image: url('sqpurple.gif');}
Let’s codesomething
hasen@microcis.net July 01, 2013Hassen poreya
Trainer, Cresco Solution
Any Questions!

More Related Content

PPT
Cascading Style Sheet
PPT
Cascading Style Sheets (CSS) help
PPTX
PPTX
LIS3353 SP12 Week 13
PPTX
1 03 - CSS Introduction
PPTX
Css ppt
PPTX
Cascading Style Sheet
Cascading Style Sheet
Cascading Style Sheets (CSS) help
LIS3353 SP12 Week 13
1 03 - CSS Introduction
Css ppt
Cascading Style Sheet

What's hot (20)

PPTX
Complete Lecture on Css presentation
PPSX
Introduction to css
PPT
Introduction to Cascading Style Sheets (CSS)
PPTX
Beginners css tutorial for web designers
PPTX
Cascading Style Sheets (CSS)
ODP
Introduction to css & its attributes with syntax
PPT
Cascading Style Sheet | CSS
PPTX
CSS Basics part One
PPT
Introduction to CSS
PPTX
Cascading style sheets (CSS)
PPTX
Cascading Style Sheet (CSS)
PPTX
Week 12 CSS - Review from last week
PPT
CSS
PPT
Css lecture notes
PDF
Introduction to CSS
PPTX
Introduction to CSS
Complete Lecture on Css presentation
Introduction to css
Introduction to Cascading Style Sheets (CSS)
Beginners css tutorial for web designers
Cascading Style Sheets (CSS)
Introduction to css & its attributes with syntax
Cascading Style Sheet | CSS
CSS Basics part One
Introduction to CSS
Cascading style sheets (CSS)
Cascading Style Sheet (CSS)
Week 12 CSS - Review from last week
CSS
Css lecture notes
Introduction to CSS
Introduction to CSS
Ad

Viewers also liked (15)

PPTX
Learn to Code with JavaScript - Choose Your Own Adventures
PDF
Web app development_php_04
PDF
Web app development_database_design_11
PDF
Web app development_my_sql_09
PPTX
CodeIgniter Practice
PDF
Web app development_crud_13
PDF
Web app development_database_design_er-mapping_12
PDF
Web app development_my_sql_08
PDF
Web app development_php_07
PDF
Web app development_php_06
PDF
Web app development_database_design_10
PDF
Web app development_php_05
PDF
Web app development_html_01
PDF
Web app development_cookies_sessions_14
PDF
Web app development_html_02
Learn to Code with JavaScript - Choose Your Own Adventures
Web app development_php_04
Web app development_database_design_11
Web app development_my_sql_09
CodeIgniter Practice
Web app development_crud_13
Web app development_database_design_er-mapping_12
Web app development_my_sql_08
Web app development_php_07
Web app development_php_06
Web app development_database_design_10
Web app development_php_05
Web app development_html_01
Web app development_cookies_sessions_14
Web app development_html_02
Ad

Similar to Web app development_html_css_03 (20)

PPTX
Web topic 15 1 basic css layout
PPT
Unit 2-CSS & Bootstrap.ppt
DOC
Css introduction
PPTX
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
PDF
CSS.pdf
PPTX
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PDF
TUTORIAL DE CSS 2.0
PPTX
Css starting
PPTX
Introduction to CSS.pptx
PPTX
CSS_Day_ONE (W3schools)
PDF
cascading style sheets ppt.sildeshower phone view
PDF
Css tutorial
PPT
Learning CSS for beginners.ppt all that are but
PPTX
Introduction to CSS
PDF
Webpage style with CSS
KEY
Lecture2
PDF
Web topic 15 1 basic css layout
Unit 2-CSS & Bootstrap.ppt
Css introduction
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
CSS.pdf
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
Cascading style sheet, CSS Box model, Table in CSS
TUTORIAL DE CSS 2.0
Css starting
Introduction to CSS.pptx
CSS_Day_ONE (W3schools)
cascading style sheets ppt.sildeshower phone view
Css tutorial
Learning CSS for beginners.ppt all that are but
Introduction to CSS
Webpage style with CSS
Lecture2

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Monthly Chronicles - July 2025
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

Web app development_html_css_03

  • 1. hasen@microcis.net July 01, 2013Hassen poreya Trainer, Cresco Solution Afghanistan Workforce Development Program HTML / CSS
  • 2. Divisions  As defined in the HTML 4.01 and XHTML 1.0 standards, the <div> tag divides your document into separate, distinct sections.  In fact you can organize and position your objects on the document with divisions (<div>).  A div is nothing more but a container, Similar to tables, but much more lighter and useful.  Older websites were using tables to position and organize the objects, that was complex as well as much more slower than the divisions.  Today’s websites are using division.
  • 3. Divisions  Inner divs comes inside another (outer) div to split up the outer div.  You define a size for each div and place it somewhere in your document, and then put your contents inside the div.  The basic syntax is like: <div> … <div> </div> … </div>
  • 4. CSS ( Cascading Style Sheet)
  • 5. CSS  Stands for Cascading Style Sheet.  Added to HTML 4.0 to solve a problem.  It separates structure from layout.  Define how to display HTML elements.  Reduces size of HTML file.  Multiple style definitions will cascade into one.
  • 6. CSS Syntax  The CSS syntax is made up of three parts:  Selector: The selector is normally the HTML element/tag  Property  Value selector {property: value} h1 {color: blue;} .p {font-size: 12px;}
  • 7. Selector  There are three kind of selectors  Group selector  Class selector  Id selector
  • 8. Group Selector  You can set a style for a group of HTML elements.  Separate selectors from each other by a comma. h1,h2,h3,h4,h5,h6 {color: green;} or p, h4, title {text-align:right;}
  • 9. Class Selector  define different styles for the same type of HTML element  CSS Syntax p.center {text-align: center}  class attribute in HTML document: <p class="center"> This paragraph will be center </p>
  • 10. Class Selector  Apply more than one class per given element.  CSS Syntax .center {text-align: center}  Class attribute in HTML document: <p class="center"> This paragraph will be center </p> <h1 class="center"> This heading will be center </h1>
  • 11. Id Selector  The id selector is defined as a #  CSS Syntax #center {text-align: center}  Idattribute in HTML document: <p id="center">Paragraph in center</p> <h1 id="center"> This heading will be center </h1>
  • 12. Inserting CSS to HTML  There are three ways of inserting a style sheet into a HTML document.  Inline Styles  Internal Style Sheet  External Style Sheet
  • 13. Inline CSS  Style is to be applied to a single occurrence of an element.  In fact, HTML style attribute comes inside a tag and hold your CSS definitions. <p style="color:sienna; margin-left:20px"> This is a paragraph </p>
  • 14. Internal CSS  You can define internal styles in the head section by using the <style> tag. <head> <style type="text/css"> p {margin-left: 20px} body{backgroun image:url(“me.jpg") </style> </head>
  • 15. External CSS  You can write all CSS code in one file and save it as “style.css” and then you can link this to your HTML document.  By doing this, you can bring changes in CSS file and then everything automatically will be change in your HTML document.  CSS File – style.css p {margin-left: 20px}  HTML File <head> <link rel="stylesheet” type="text/css” href=“style.css"/> </head>
  • 16. Basic style properties Background-color: value; Background-image: value; Font-family: value; Font-size: value; Float: value; Text-align: value; Color: value; Width: value; Height: value;
  • 17. CSS Backgrounds  CSS properties used for background effects:  background-color (Color)  background-image (Image URL)  background-repeat (Repeat to X and Y)  background-attachment (Fixed or Scroll)  background-position (top, right, left, bottom)
  • 18. CSS Backgrounds  body {background-color:#b0c4de;}  p {background-color:#e0ffff;}  body {background-image:url(‘microcis.png');}  Body{ background-image:url('gradient.png'); background-repeat:repeat-x;}  Body{ background-image:url(‘logo.png'); background-repeat:no-repeat; background-psition:right top;} Shorthand style: body {background:#fff url('img_tree.png') no-repeat right top;} Order: background-color, background-image, background-repeat, background-attachment background-position
  • 19. CSS Text Style  Some CSS properties used to style the texts.  Color (Text color)  Direction (left to right, right to left)  Text-align (left, center, right)  Text-decoration (Underline, overline, …)  Text-transform (uppercase, lowercase)  Text-indent (pixels)  Letter-spacing (pixels)  Word-spacing (pixels)
  • 20. CSS Text Style h1 {color:#00ff00;} h2 {color:rgb(255,0,0);} p.date {text-align:right;} a {text-decoration:none;} h1 {text-decoration:overline;} h2 {text-decoration:line-through;} h3 {text-decoration:underline;} h4 {text-decoration:blink;} p.uppercase {text-transform:uppercase;} p.capitalize {text-transform:capitalize;} p {text-indent:50px;}
  • 21. CSS Link Style  Almost any CSS property can be attached to links.  color, font-family, background, dir, margin, text- decoration, … a:link – a normal, unvisited link a:visited – a visited link a:hover – react on mouse over a:active – a link the moment it is clicked
  • 22. CSS Link Style a:link {color:#FF0000;} a:visited {color:#00FF00;} a:hover {color:#FF00FF;} a:active {color:#0000FF;} ------------------------------------- a:link {text-decoration:none;} a:visited {text-decoration:none;} a:hover {text-decoration:underline;} a:active {text-decoration:underline;}
  • 23. CSS List Style  The CSS list properties allow you to:  Set different list item markers for ordered lists.  Set different list item markers for unordered lists.  Set an image as the list item marker. ul.a {list-style-type: circle;} ul.b {list-style-type: square;} ol.c {list-style-type: upper-roman;} ol.d {list-style-type: lower-alpha;} -- Ul{ list-style-image: url('sqpurple.gif');}
  • 25. hasen@microcis.net July 01, 2013Hassen poreya Trainer, Cresco Solution Any Questions!