CSS box model, Text Formatting, Table Formatting
CS141L – Session 2016 BSCS RCET
HTML defines Contents of document
Style Define Appearance
Benefits
 Beautification
 Look control
 Change layout of pages just by adding a new style sheet
 Users bored with your style, change under an hour
 Layout control
 Show different on different devices (e.g. cellphone, desktop,
printer etc)
 Less Work
 Same content 3 looks
 Be creative, imagine things
 Do you know his biting power is 4670 N/Sq in
 Three Ways
 Inline
 Add an attribute style to element
 Mention all the style rules as value to this attribute
 Today we will be doing that
 Embedded
 Write style rules separate in style tag (may be in head tag)
 External
 Write style rules in a separate file
 2nd and third are mostly used
 Style rules are most likely the properties
 Your Properties
 Name
 Age
 Reg No
 Height
 Just like so
 Example
 color:red;
 Write the style for which element you want to apply
 <p style=“color:red;”>This is a paragraph</p>
Omaar
19
2016-CS-15
5ft 9in
 Browser says every element is a rectangular box
 Have border, margin, padding, background
 demo
 Width: 100px
 Margin: 20px
 Padding: 10px
 Border:1px
 What is visible width?
 20+1+10+100+10+1+20
 = 162px
 Open the provided document in brackets & firefox
 Open Developer tools & inspect
 What you see? Discussion
 Put important things in new div
 We are going to create following layout
 discussion
 Width of any element
 width: value;
 Padding of any element
 padding: value;
 padding: T R B L;
 padding: TB RL;
 Margin of any element
 margin: value;
 margin: T R B L;
 margin: TB RL;
 Value can be in length unit, %. Unit (px, in, cm, pt, em etc)
 Create the layout shown above
 Any color formed by RGB (each 0-255, 8bit)
 Color name
 Red, green, blue (see figure 13.1, 13.2 form book)
 RGB format
 rgb(120, 245, 190);
 rgb(10%, 50%, 50%);
 rgba(123, 145, 30,0.6);
 Hex format
 #RRGGBB
 #0A3B90
 #F0C
 Means #FF00CC
 Don’t know color value
 Go to MS paint
 Bracket let you choose form color picker
 Foreground color (or Font color)
 color:value;
 Background color
 background-color:value;
 Value can be RGB, color name, HEX, transparent, inherit
 Apply Colors As given
 Content back color pure white using hex, font black
 Body tag back color gray using rgb
 Header font color black using color name
 Heading of content font color orange (adjust using color picker)
 Footer font color of gray shade (must visible)
 Change opacity of heading
 Remove padding, margin applied from developer tool
 Do you see a difference
 Every box can have a border at any side
 border-top-width, border-right-width, border-bottom-width, border-left-
width or border-width
 Value: length units | thin | medium | thick | inherit
 Each side border can have a different style
 border-top-style, border-right-style, border-bottom-style, border-left-
style or border-style
 Value: none, dotted, dashed, solid, double, groove, ridge, inset | outset |
inherit
 Border Color
 border-top-color, border-right-color,
 border-bottom-color, border-left-color, or border-color
 Value: color, transparent, inherit
 Apply bottom dotted border to footer
 Color matched to gray shade
 Apply gray matched full border to content
 Every border corner can be rounded
 border-top-left-radius, border-top-right-radius, border-bottom-
right-radius, border-bottom-left-radius or border-radius
 Value: length measurement, percentage
 Apply border radius 30px to content
 font-family: font, font, ..;
 font-family:Courier, Times;
 font-size:value;
 Value: length unit, percentage, xx-small, x-small, small, medium,
large, x-large, xx-large, smaller, larger, inherit
 font-style:value;
 Value: normal, italic, oblique, inherit
 line-height:value;
 Value: number, length measurement, percentage, normal, inherit
 Go to ms word select a beautiful font style for Header text
 Change line height of list
 Horizontal alignment
 text-align:value;
 Value: left, right, center, justify
 Text indentation
 text-indent:value;
 value:length unit, percentage, inherit
 text-decoration:value;
 Value: none, underline, overline, line-through, blink
 letter-spacing:value;
 Value: length measurement, normal, inherit
 Justify content first paragraph, right align second one, indent
30px
 Align footer to right
 Blink footer text (most browser do not support it)
 Increase letter spacing of list to 5px
 Resize browser, can be viewed on smartphone cool!
 Text Shadow
 text-shadow:value;
 Value: h-offset v-offset blur-radius| none
 Give a shadow to content heading
 You can create different affects
 Book Page 256
Css summary
 Book Reading
 Chapter 11 (intro only)
 Chapter 12
 Chapter 13 (till page 275)
 Chapter 14
 Assignment
 Create the following invoice, use inline styles
 It uses table for content arrangement
 Show in the office on 3-Jan-2017
Css summary

More Related Content

PDF
Tableau - crosstab
PDF
Lab#8 page layouts
PPT
Using Charts in Word
PPTX
Bar Graphs And Histograms
PDF
Plan601 e session 4 presentation
PPTX
Column charts
PPTX
Graphical representation of data
PPTX
Field Types
Tableau - crosstab
Lab#8 page layouts
Using Charts in Word
Bar Graphs And Histograms
Plan601 e session 4 presentation
Column charts
Graphical representation of data
Field Types

Similar to Css summary (20)

PPTX
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
PDF
Introduction to CSS
PPT
CSS for Beginners
PDF
Web Design Course: CSS lecture 3
PPTX
Css Complete Notes
PPT
PDF
cascading stylesheet_cssppt-100604051600-phpapp02.pdf
PDF
Pemrograman Web 2 - CSS
PPTX
Chapter 13: Colors and Backgrounds
PPTX
Css3 Complete Reference
PPT
PPT
CSS
PPTX
Pres
PPTX
Web Engineering - Introduction to CSS
PPTX
L4 Fashioning Text Styles and Colors
PDF
csscheatsheet.pdf
PPTX
chapter3 chapter2 of Web Development and Design Foundations with HTML5
PPTX
css-note.pptx
PPTX
css3.0.( Cascading Style Sheets ) pptx
Presentation on CSS, Style Sheet, Types of Styles, Types of Text Formatting, ...
Introduction to CSS
CSS for Beginners
Web Design Course: CSS lecture 3
Css Complete Notes
cascading stylesheet_cssppt-100604051600-phpapp02.pdf
Pemrograman Web 2 - CSS
Chapter 13: Colors and Backgrounds
Css3 Complete Reference
CSS
Pres
Web Engineering - Introduction to CSS
L4 Fashioning Text Styles and Colors
csscheatsheet.pdf
chapter3 chapter2 of Web Development and Design Foundations with HTML5
css-note.pptx
css3.0.( Cascading Style Sheets ) pptx
Ad

More from maamir farooq (20)

DOCX
Ooad lab1
PPT
Lesson 03
PPT
Lesson 02
PDF
Php client libray
PDF
Swiftmailer
PDF
PDF
PPTX
PDF
PDF
J query 1.7 cheat sheet
PDF
Assignment
PDF
Java script summary
PDF
PDF
PPTX
DOCX
Manual of image processing lab
PDF
Session management
PDF
Data management
PPTX
Content provider
PDF
Android sq lite database tutorial
Ooad lab1
Lesson 03
Lesson 02
Php client libray
Swiftmailer
J query 1.7 cheat sheet
Assignment
Java script summary
Manual of image processing lab
Session management
Data management
Content provider
Android sq lite database tutorial
Ad

Recently uploaded (20)

PPT
THE ROLE OF MANAGERIAL FINANCE MANAJEMEN KEUANGAN - GITMAN
PPTX
ncm111111000jjjjjjjjjajksdjkajdiifhdshfkwj.pptx
PPT
MANAJEMEN KEUANGAN THE FINANCIAL MARKET ENVIRONMENT- GITMAN
PDF
The Complete Guide to Corporate Tax in the UAE
PDF
Entrep Part I entrepreneurship and business
PDF
LCP-Inheritance-tax-on-pensions-2025.pdf
PPTX
Blogs and Other information - August 2025.pptx
PPT
IFM Chapter 01 of International Financial Management
PDF
B481221.pdf American Journal of Multidisciplinary Research and Review
PPTX
business notesxxxxxxxxxxxxxxxxxxxxxxx.pptx
PDF
Lundin Gold - September 2025.pdf presentation
DOCX
INCREASING THE BRAND AWARENESS OF SULWHASOO COSMETICS IN THE VIETNAMESE MARKET
PDF
Infant formula Market in Saudi report.pdf
PPTX
PUBLIC ADMINISTRATION-102-GROUP-1-PPT.pptx
PPTX
Pension Playpen - The Honda Aga pension scheme comparison.pptx
PDF
4.+Naspub_Cicilia+Denasdfasdfsdfsdf+A+(240-253).pdf
PPTX
Indonesia's Economic and Capital Market Development
PPTX
ANAN The Accountancy Profession and National Anti-Corruption Strategy -Prof O...
PPTX
MRI.kskdjdjdjdjdndjdjdjdjjdhdjdjdjdjdjdj
PPTX
ekonomi what is economymatkul makro ekonomi.pptx
THE ROLE OF MANAGERIAL FINANCE MANAJEMEN KEUANGAN - GITMAN
ncm111111000jjjjjjjjjajksdjkajdiifhdshfkwj.pptx
MANAJEMEN KEUANGAN THE FINANCIAL MARKET ENVIRONMENT- GITMAN
The Complete Guide to Corporate Tax in the UAE
Entrep Part I entrepreneurship and business
LCP-Inheritance-tax-on-pensions-2025.pdf
Blogs and Other information - August 2025.pptx
IFM Chapter 01 of International Financial Management
B481221.pdf American Journal of Multidisciplinary Research and Review
business notesxxxxxxxxxxxxxxxxxxxxxxx.pptx
Lundin Gold - September 2025.pdf presentation
INCREASING THE BRAND AWARENESS OF SULWHASOO COSMETICS IN THE VIETNAMESE MARKET
Infant formula Market in Saudi report.pdf
PUBLIC ADMINISTRATION-102-GROUP-1-PPT.pptx
Pension Playpen - The Honda Aga pension scheme comparison.pptx
4.+Naspub_Cicilia+Denasdfasdfsdfsdf+A+(240-253).pdf
Indonesia's Economic and Capital Market Development
ANAN The Accountancy Profession and National Anti-Corruption Strategy -Prof O...
MRI.kskdjdjdjdjdndjdjdjdjjdhdjdjdjdjdjdj
ekonomi what is economymatkul makro ekonomi.pptx

Css summary

  • 1. CSS box model, Text Formatting, Table Formatting CS141L – Session 2016 BSCS RCET
  • 2. HTML defines Contents of document Style Define Appearance Benefits  Beautification  Look control  Change layout of pages just by adding a new style sheet  Users bored with your style, change under an hour  Layout control  Show different on different devices (e.g. cellphone, desktop, printer etc)  Less Work
  • 4.  Be creative, imagine things  Do you know his biting power is 4670 N/Sq in
  • 5.  Three Ways  Inline  Add an attribute style to element  Mention all the style rules as value to this attribute  Today we will be doing that  Embedded  Write style rules separate in style tag (may be in head tag)  External  Write style rules in a separate file  2nd and third are mostly used  Style rules are most likely the properties
  • 6.  Your Properties  Name  Age  Reg No  Height  Just like so  Example  color:red;  Write the style for which element you want to apply  <p style=“color:red;”>This is a paragraph</p> Omaar 19 2016-CS-15 5ft 9in
  • 7.  Browser says every element is a rectangular box  Have border, margin, padding, background  demo  Width: 100px  Margin: 20px  Padding: 10px  Border:1px  What is visible width?  20+1+10+100+10+1+20  = 162px
  • 8.  Open the provided document in brackets & firefox  Open Developer tools & inspect  What you see? Discussion  Put important things in new div  We are going to create following layout  discussion
  • 9.  Width of any element  width: value;  Padding of any element  padding: value;  padding: T R B L;  padding: TB RL;  Margin of any element  margin: value;  margin: T R B L;  margin: TB RL;  Value can be in length unit, %. Unit (px, in, cm, pt, em etc)  Create the layout shown above
  • 10.  Any color formed by RGB (each 0-255, 8bit)  Color name  Red, green, blue (see figure 13.1, 13.2 form book)  RGB format  rgb(120, 245, 190);  rgb(10%, 50%, 50%);  rgba(123, 145, 30,0.6);  Hex format  #RRGGBB  #0A3B90  #F0C  Means #FF00CC  Don’t know color value  Go to MS paint  Bracket let you choose form color picker
  • 11.  Foreground color (or Font color)  color:value;  Background color  background-color:value;  Value can be RGB, color name, HEX, transparent, inherit  Apply Colors As given  Content back color pure white using hex, font black  Body tag back color gray using rgb  Header font color black using color name  Heading of content font color orange (adjust using color picker)  Footer font color of gray shade (must visible)  Change opacity of heading  Remove padding, margin applied from developer tool  Do you see a difference
  • 12.  Every box can have a border at any side  border-top-width, border-right-width, border-bottom-width, border-left- width or border-width  Value: length units | thin | medium | thick | inherit  Each side border can have a different style  border-top-style, border-right-style, border-bottom-style, border-left- style or border-style  Value: none, dotted, dashed, solid, double, groove, ridge, inset | outset | inherit  Border Color  border-top-color, border-right-color,  border-bottom-color, border-left-color, or border-color  Value: color, transparent, inherit  Apply bottom dotted border to footer  Color matched to gray shade  Apply gray matched full border to content
  • 13.  Every border corner can be rounded  border-top-left-radius, border-top-right-radius, border-bottom- right-radius, border-bottom-left-radius or border-radius  Value: length measurement, percentage  Apply border radius 30px to content
  • 14.  font-family: font, font, ..;  font-family:Courier, Times;  font-size:value;  Value: length unit, percentage, xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, inherit  font-style:value;  Value: normal, italic, oblique, inherit  line-height:value;  Value: number, length measurement, percentage, normal, inherit  Go to ms word select a beautiful font style for Header text  Change line height of list
  • 15.  Horizontal alignment  text-align:value;  Value: left, right, center, justify  Text indentation  text-indent:value;  value:length unit, percentage, inherit  text-decoration:value;  Value: none, underline, overline, line-through, blink  letter-spacing:value;  Value: length measurement, normal, inherit  Justify content first paragraph, right align second one, indent 30px  Align footer to right  Blink footer text (most browser do not support it)  Increase letter spacing of list to 5px  Resize browser, can be viewed on smartphone cool!
  • 16.  Text Shadow  text-shadow:value;  Value: h-offset v-offset blur-radius| none  Give a shadow to content heading  You can create different affects  Book Page 256
  • 18.  Book Reading  Chapter 11 (intro only)  Chapter 12  Chapter 13 (till page 275)  Chapter 14  Assignment  Create the following invoice, use inline styles  It uses table for content arrangement  Show in the office on 3-Jan-2017