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
Cascading Styling Sheets(CSS) simple design language intended to transform th...
PPT
CSS Training in Bangalore
PPT
Unit 2-CSS & Bootstrap.ppt
PDF
The CSS Handbook
PPTX
Introduction to Wed System And Technologies (1).pptx
PPTX
Cascading Style Sheets for web browser.pptx
PPTX
Web Development - Lecture 5
PPTX
cascading style sheet(css).pptx
PPTX
Lecture-6.pptx
PPTX
Cashcading stylesheets
PPTX
CSS_Day_ONE (W3schools)
PDF
PPTX
cascading style sheets- About cascading style sheets on the selectors
PPTX
uptu web technology unit 2 Css
PPTX
WEB TECHNOLOGY Unit-2.pptx
PDF
Intro to HTML and CSS - Class 2 Slides
PPTX
INTRODUCTIONS OF CSS
PPTX
Lecture 9 CSS part 1.pptxType Classification
PPT
Css training tutorial css3 &amp; css4 essentials
PPTX
Unit 2 WT-CSS.pptx web technology project
PPTX
UNIT 3WOP fgfufhbuiibpvihbvpihivbhibvipuuvbiuvboi
PPTX
chitra
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PPT
CSS 101
PDF
Css tutorial
PDF
Css tutorial
PDF
Css - Tutorial
PPT
hne human computer of eork sicew das.ppt
PPT
bxe vary very signed computer se sad.ppt

More Related Content

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

Similar to Introduction to CSS.pptx web for web web

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

More from compengwaelalahmar

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

Recently uploaded

PPTX
York "Collaboration for Research Support at U-M Library"
PPTX
ELEMENTS OF COMMUNICATION (UNIT 2) .pptx
PPTX
How to Manage Line Discounts in Odoo 18 POS
PPTX
Semester 6 UNIT 2 Dislocation of hip.pptx
PDF
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
PPTX
15 December 2025 Education for human flourishing Michael Stevenson .pptx
PDF
Analyzing the data of your initial survey
PDF
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
PPTX
10-12-2025 Francois Staring How can Researchers and Initial Teacher Educators...
PDF
Projecte de la porta de primer B: L'antic Egipte
PPTX
How to Manage Reception Report in Odoo 18 Inventory
PPTX
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
PPTX
Vitamins and mineral deficiency , signs and symptoms associated with exercise
PDF
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
PDF
APM Wessex Network: DEIB Policy into Practice
PPTX
Accounting Skills Paper-II (Registers of PACs and Credit Co-operative Societies)
PPTX
Cost of Capital - Cost of Equity, Cost of debenture, Cost of Preference share...
PPTX
ICH Harmonization A Global Pathway to Unified Drug Regulation.pptx
PDF
Projecte de la porta d'i5B: Els animals marins
PPTX
Searching in PubMed andCochrane_Practical Presentation.pptx
York "Collaboration for Research Support at U-M Library"
ELEMENTS OF COMMUNICATION (UNIT 2) .pptx
How to Manage Line Discounts in Odoo 18 POS
Semester 6 UNIT 2 Dislocation of hip.pptx
IMANI Africa files RTI request seeking full disclosure on 2026 SIM registrati...
15 December 2025 Education for human flourishing Michael Stevenson .pptx
Analyzing the data of your initial survey
BỘ TEST KIỂM TRA CUỐI HỌC KÌ 1 - TIẾNG ANH 6-7-8-9 GLOBAL SUCCESS - PHIÊN BẢN...
10-12-2025 Francois Staring How can Researchers and Initial Teacher Educators...
Projecte de la porta de primer B: L'antic Egipte
How to Manage Reception Report in Odoo 18 Inventory
Campfens "The Data Qualify Challenge: Publishers, institutions, and funders r...
Vitamins and mineral deficiency , signs and symptoms associated with exercise
Digital Wellness in University Communities: Libraries as Guardians of Healthy...
APM Wessex Network: DEIB Policy into Practice
Accounting Skills Paper-II (Registers of PACs and Credit Co-operative Societies)
Cost of Capital - Cost of Equity, Cost of debenture, Cost of Preference share...
ICH Harmonization A Global Pathway to Unified Drug Regulation.pptx
Projecte de la porta d'i5B: Els animals marins
Searching in PubMed andCochrane_Practical Presentation.pptx

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