Movatterモバイル変換


[0]ホーム

URL:


PPTX, PDF10 views

Introduction to CSS.pptx web for web web

This document provides an overview of CSS, explaining its significance, syntax, and various selectors. It discusses the advantages of using CSS, such as improved design efficiency, faster loading times, and better separation of content and presentation. Additionally, it covers how to implement CSS using inline, internal, and external stylesheets, as well as the importance of comments and grouping selectors for better code organization.

Embed presentation

Download to read offline
Introduction to CSS
Why CSS?• CSS Provides Efficiency in Design and Updates• CSS relatively easy to use• Can give you more flexibility and control• Faster loading pages• Increased consistency• Brings more sophistication to web design• CSS is designed primarily to enable the separationof document content from document presentation.
Why CSS? (continued)• W3C standard, started in 1996• Improves accessibility– Tables not required for elegance• Reduces the complexity of pages– Which in turn has led to more sophistication…• It’s open up the way for other technologies to bebuilt on and be supported by CSS. There are dozens,and still growing.• Example, “Bootstrap”, which is an open sourceframework that combines CSS, HTML and Javascript
CSS Overview• CSS (Cascading Style Sheets)• CSS defines HTML display• Styles were added to HTML 4.0 to solve aproblem• External Style Sheets are stored in .css files
CSS Syntax• Selectors• Declaration• Properties• Values
Selectors• A “selector” is an instruction in a CSS rule setthat tells the browser what elements to‘select’ for styling.• Here are some that we will look at:– element Selector– id Selector– class Selector– grouping Selectors
Element or Tag Selector• This selector selects tags by tag or “element”name.• This selector must match one or more HTMLelements of the same name.• Easiest to use
Element Selectorp {text-align: center;color: red;}HTML<p>UAlbany is one of the SUNYcenters.</p>
ID Selector• The ID selector as a unique identifier to an element.• The id selector is used if you want to select a single,unique element.• CSS uses a hash or pound sign (#) to indicate it’s ID• ID's are unique– IDs in theory, are only supposed to be used once perpage– In other words, a page would not be validate by W3Cstandards.• Anytime we see ID in the computer world, think“unique”.
The id Selector#text1 {text-align: center;color: green;}<h1 id="text1">Think Spring!</h1>
Class Selector• This selector allows you to style contentirrespective of what tag you apply it to• Classes are NOT unique– Use same class on multiple elements.– Use multiple classes on the same element.
The class Selector.center {text-align: center;color: green;}<h1 class="center">Think Spring!</h1><p class="center">Think Spring!</p>
CSS Grouping• When several selectors share the same declarations, they may begrouped into a comma-separated list.• Take thish1 { font-family: sans-serif }h2 { font-family: sans-serif }h3 { font-family: sans-serif }And, do this:h1, h2, h3 { font-family: sans-serif }
CSS Comments• As with other computer languages, CSS allowsfor comments• Comments remind you and tell fellow coderswhat your CSS does• Allows you to “flag” code for further review• Indispensable for large website andprogramming projects
CSS Commentsh1 { font-size: 24px; font-weight: bold; border: 1px solidblack; color: pink; }/* This will make all <h1>headers big, bold, pink, andinside of a thin blackrectangle! */
Ways to Insert CSS• Externally• Internally• Inline styles (inside tags)
Inline Styles• Insert CSS style right within the HTML tag thatyou want to apply them too.• Very quick• However, difficult to maintain• Use sparingly<h1 style="color:blue;margin-left:30px;">Think Spring!</h1>
Internal (or Embedded) CSS• Placed right on top of the page that it willaffect• As with DTDs, you can internally create astylesheet• They are more convenient for small webpages• Mixing content and style will cause your pagesto become unwieldy over time.
Internal CSS stylesheet<html><head><style type="text/css">p {color: white; }body {background-color: black; }</style></head><body><p>White text on a black background!</p></body></html>
External Stylesheet• Why use an external stylesheet?– It keeps your website design and content separate.• CSS code is easier to reuse.• Instead of typing the same CSS code on every webpage you have,• Merely have many pages refer to a single CSS filewith the "link" tag.• You can make massive alterations to your webpages with just a few changes in a single CSS file
External CSS StylesheetIn your .XSL file, you will link out using thiscommand:<head><link rel="stylesheet" type="text/css" href="mystyle.css“/></head>
Browsers and CSS3To bereplaced byproject“Spartan”

Recommended

PPTX
Introduction to Wed System And Technologies (1).pptx
PPTX
Cascading Styling Sheets(CSS) simple design language intended to transform th...
PPTX
Web Development - Lecture 5
PDF
The CSS Handbook
PPT
Unit 2-CSS & Bootstrap.ppt
PPTX
Cascading Style Sheets for web browser.pptx
PPTX
cascading style sheet(css).pptx
PPT
CSS Training in Bangalore
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
Unit 2 WT-CSS.pptx web technology project
PPTX
cascading style sheets- About cascading style sheets on the selectors
PPTX
uptu web technology unit 2 Css
PDF
PPTX
WEB TECHNOLOGY Unit-2.pptx
PPTX
Lecture-6.pptx
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PPTX
chitra
PDF
Css - Tutorial
PDF
Css tutorial
PPTX
Cashcading stylesheets
PPT
Css training tutorial css3 &amp; css4 essentials
PDF
Css tutorial
PPTX
CSS_Day_ONE (W3schools)
PDF
Intro to HTML and CSS - Class 2 Slides
PPT
CSS 101
PPTX
INTRODUCTIONS OF CSS
PPTX
Lecture 9 CSS part 1.pptxType Classification
PPTX
lec11_CSS.pptx web page description desi
PPT
week1 computer architecture and design for

More Related Content

PPTX
Introduction to Wed System And Technologies (1).pptx
PPTX
Cascading Styling Sheets(CSS) simple design language intended to transform th...
PPTX
Web Development - Lecture 5
PDF
The CSS Handbook
PPT
Unit 2-CSS & Bootstrap.ppt
PPTX
Cascading Style Sheets for web browser.pptx
PPTX
cascading style sheet(css).pptx
PPT
CSS Training in Bangalore
Introduction to Wed System And Technologies (1).pptx
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Web Development - Lecture 5
The CSS Handbook
Unit 2-CSS & Bootstrap.ppt
Cascading Style Sheets for web browser.pptx
cascading style sheet(css).pptx
CSS Training in Bangalore

Similar to Introduction to CSS.pptx web for web web

PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
Unit 2 WT-CSS.pptx web technology project
PPTX
cascading style sheets- About cascading style sheets on the selectors
PPTX
uptu web technology unit 2 Css
PDF
PPTX
WEB TECHNOLOGY Unit-2.pptx
PPTX
Lecture-6.pptx
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PPTX
chitra
PDF
Css - Tutorial
PDF
Css tutorial
PPTX
Cashcading stylesheets
PPT
Css training tutorial css3 &amp; css4 essentials
PDF
Css tutorial
PPTX
CSS_Day_ONE (W3schools)
PDF
Intro to HTML and CSS - Class 2 Slides
PPT
CSS 101
PPTX
INTRODUCTIONS OF CSS
PPTX
Lecture 9 CSS part 1.pptxType Classification
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
Unit 2 WT-CSS.pptx web technology project
cascading style sheets- About cascading style sheets on the selectors
uptu web technology unit 2 Css
WEB TECHNOLOGY Unit-2.pptx
Lecture-6.pptx
Cascading style sheet, CSS Box model, Table in CSS
chitra
Css - Tutorial
Css tutorial
Cashcading stylesheets
Css training tutorial css3 &amp; css4 essentials
Css tutorial
CSS_Day_ONE (W3schools)
Intro to HTML and CSS - Class 2 Slides
CSS 101
INTRODUCTIONS OF CSS
Lecture 9 CSS part 1.pptxType Classification

More from compengwaelalahmar

PPTX
lec11_CSS.pptx web page description desi
PPT
week1 computer architecture and design for
PPT
D-lr-parsing compiler how to compiler com
PPT
bxe vary very signed computer se sad.ppt
PPT
hne human computer of eork sicew das.ppt
PPT
Camtasia Getting Started Guide how to design.ppt
PPTX
8.haft design web designer web for web w
PPT
ITEC229_Chapter8_new.ppt computer architecture
PPTX
HTML-CSS.pptx computer architect design v
PPTX
ilet109_2.pptx web designer web page for
PPTX
software architecturev2.pptx cop computr
PPT
lec00-outline.PPT cpp compiler how to cpp
PPTX
HTML 1 - Girf desigcomp web design web g
PPTX
HTML 3 - Stiller for December design web
PPTX
lecture-11-1590405846 computer architect
PPT
lec01_intr architecture com computeo.ppt
PPT
A-overview.pptbb cpp introduction how cpp
PPT
CS540-2-lecture1.pptgvcxc increment cpp cpp
PPT
Compiler to compiler whatsypechecking.PPT
PPT
LR_Parser compiler how to compiler lr1 ll1
lec11_CSS.pptx web page description desi
week1 computer architecture and design for
D-lr-parsing compiler how to compiler com
bxe vary very signed computer se sad.ppt
hne human computer of eork sicew das.ppt
Camtasia Getting Started Guide how to design.ppt
8.haft design web designer web for web w
ITEC229_Chapter8_new.ppt computer architecture
HTML-CSS.pptx computer architect design v
ilet109_2.pptx web designer web page for
software architecturev2.pptx cop computr
lec00-outline.PPT cpp compiler how to cpp
HTML 1 - Girf desigcomp web design web g
HTML 3 - Stiller for December design web
lecture-11-1590405846 computer architect
lec01_intr architecture com computeo.ppt
A-overview.pptbb cpp introduction how cpp
CS540-2-lecture1.pptgvcxc increment cpp cpp
Compiler to compiler whatsypechecking.PPT
LR_Parser compiler how to compiler lr1 ll1

Recently uploaded

PDF
The Drift Principle: When Information Accelerates Faster Than Minds Can Compress
PDF
FAMILY ASSESSMENT FORMAT - CHN practical
DOCX
Mobile applications Devlopment ReTest year 2025-2026
PPTX
Details of Muscular-and-Nervous-Tissues.pptx
PPTX
Searching in PubMed andCochrane_Practical Presentation.pptx
PPTX
Limpitlaw "Licensing: From Mindset to Milestones"
PPTX
How to use search_read method in Odoo 18
PPTX
Pig- piggy bank in Big Data Analytics.ppt.pptx
PPTX
CHAPTER NO.08 HCP BY GG CLINICAL PHARMACY
PDF
Projecte de la porta de primer B: L'antic Egipte
PPTX
Semester 6 unit 2 Atopic dermatitis.pptx
PDF
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
PDF
Current Electricity for first year physiotherapy
PPTX
2025-2026 History in your Hands Class 4 December 2025 January 2026 .pptx
PDF
Blue / Green: Troop Leading Procedure (TLP) Overview.pdf
PDF
The Tale of Melon City poem ppt by Sahasra
PPTX
York "Collaboration for Research Support at U-M Library"
PPTX
How to Manage Reception Report in Odoo 18 Inventory
PPTX
The Cell & Cell Cycle-detailed structure and function of organelles.pptx
PDF
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...
The Drift Principle: When Information Accelerates Faster Than Minds Can Compress
FAMILY ASSESSMENT FORMAT - CHN practical
Mobile applications Devlopment ReTest year 2025-2026
Details of Muscular-and-Nervous-Tissues.pptx
Searching in PubMed andCochrane_Practical Presentation.pptx
Limpitlaw "Licensing: From Mindset to Milestones"
How to use search_read method in Odoo 18
Pig- piggy bank in Big Data Analytics.ppt.pptx
CHAPTER NO.08 HCP BY GG CLINICAL PHARMACY
Projecte de la porta de primer B: L'antic Egipte
Semester 6 unit 2 Atopic dermatitis.pptx
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
Current Electricity for first year physiotherapy
2025-2026 History in your Hands Class 4 December 2025 January 2026 .pptx
Blue / Green: Troop Leading Procedure (TLP) Overview.pdf
The Tale of Melon City poem ppt by Sahasra
York "Collaboration for Research Support at U-M Library"
How to Manage Reception Report in Odoo 18 Inventory
The Cell & Cell Cycle-detailed structure and function of organelles.pptx
Unit-III pdf (Basic listening Skill, Effective Writing Communication & Writin...

Introduction to CSS.pptx web for web web

  • 1.
  • 2.
    Why CSS?• CSSProvides Efficiency in Design and Updates• CSS relatively easy to use• Can give you more flexibility and control• Faster loading pages• Increased consistency• Brings more sophistication to web design• CSS is designed primarily to enable the separationof document content from document presentation.
  • 3.
    Why CSS? (continued)•W3C standard, started in 1996• Improves accessibility– Tables not required for elegance• Reduces the complexity of pages– Which in turn has led to more sophistication…• It’s open up the way for other technologies to bebuilt on and be supported by CSS. There are dozens,and still growing.• Example, “Bootstrap”, which is an open sourceframework that combines CSS, HTML and Javascript
  • 4.
    CSS Overview• CSS(Cascading Style Sheets)• CSS defines HTML display• Styles were added to HTML 4.0 to solve aproblem• External Style Sheets are stored in .css files
  • 5.
    CSS Syntax• Selectors•Declaration• Properties• Values
  • 6.
    Selectors• A “selector”is an instruction in a CSS rule setthat tells the browser what elements to‘select’ for styling.• Here are some that we will look at:– element Selector– id Selector– class Selector– grouping Selectors
  • 7.
    Element or TagSelector• This selector selects tags by tag or “element”name.• This selector must match one or more HTMLelements of the same name.• Easiest to use
  • 8.
    Element Selectorp {text-align:center;color: red;}HTML<p>UAlbany is one of the SUNYcenters.</p>
  • 9.
    ID Selector• TheID selector as a unique identifier to an element.• The id selector is used if you want to select a single,unique element.• CSS uses a hash or pound sign (#) to indicate it’s ID• ID's are unique– IDs in theory, are only supposed to be used once perpage– In other words, a page would not be validate by W3Cstandards.• Anytime we see ID in the computer world, think“unique”.
  • 10.
    The id Selector#text1{text-align: center;color: green;}<h1 id="text1">Think Spring!</h1>
  • 11.
    Class Selector• Thisselector allows you to style contentirrespective of what tag you apply it to• Classes are NOT unique– Use same class on multiple elements.– Use multiple classes on the same element.
  • 12.
    The class Selector.center{text-align: center;color: green;}<h1 class="center">Think Spring!</h1><p class="center">Think Spring!</p>
  • 13.
    CSS Grouping• Whenseveral selectors share the same declarations, they may begrouped into a comma-separated list.• Take thish1 { font-family: sans-serif }h2 { font-family: sans-serif }h3 { font-family: sans-serif }And, do this:h1, h2, h3 { font-family: sans-serif }
  • 14.
    CSS Comments• Aswith other computer languages, CSS allowsfor comments• Comments remind you and tell fellow coderswhat your CSS does• Allows you to “flag” code for further review• Indispensable for large website andprogramming projects
  • 15.
    CSS Commentsh1 {font-size: 24px; font-weight: bold; border: 1px solidblack; color: pink; }/* This will make all <h1>headers big, bold, pink, andinside of a thin blackrectangle! */
  • 16.
    Ways to InsertCSS• Externally• Internally• Inline styles (inside tags)
  • 17.
    Inline Styles• InsertCSS style right within the HTML tag thatyou want to apply them too.• Very quick• However, difficult to maintain• Use sparingly<h1 style="color:blue;margin-left:30px;">Think Spring!</h1>
  • 18.
    Internal (or Embedded)CSS• Placed right on top of the page that it willaffect• As with DTDs, you can internally create astylesheet• They are more convenient for small webpages• Mixing content and style will cause your pagesto become unwieldy over time.
  • 19.
    Internal CSS stylesheet<html><head><styletype="text/css">p {color: white; }body {background-color: black; }</style></head><body><p>White text on a black background!</p></body></html>
  • 20.
    External Stylesheet• Whyuse an external stylesheet?– It keeps your website design and content separate.• CSS code is easier to reuse.• Instead of typing the same CSS code on every webpage you have,• Merely have many pages refer to a single CSS filewith the "link" tag.• You can make massive alterations to your webpages with just a few changes in a single CSS file
  • 21.
    External CSS StylesheetInyour .XSL file, you will link out using thiscommand:<head><link rel="stylesheet" type="text/css" href="mystyle.css“/></head>
  • 22.
    Browsers and CSS3Tobereplaced byproject“Spartan”

[8]ページ先頭

©2009-2025 Movatter.jp