Cascading Style Sheets Controlling the Display Of Web Content.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Advertisements

CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Chapter 8 Creating Style Sheets.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
AD Intermediate Computer Graphics | spring 2008 | Daria Tsoupikova | School of Art and Design | UIC CSS Cascading Style Sheets.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic CSS: Cascading Style Sheets.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Cascading Style Sheets Controlling the Display Of Web Content.
4.01 Cascading Style Sheets
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Cascading style sheets (CSS)
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Doman’s Sections Information in this presentation includes text and images from
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
Website Development & Management Working with Style Rules Instructor: John Seydel, Ph.D. CIT Fall
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
CSS Basic (cascading style sheets)
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 6.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 8.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
1 Cascading Style Sheets
CSS.
Working with Cascading Style Sheets
Getting Started with CSS
4.01 Cascading Style Sheets
An Introduction to Cascading Style Sheets
CSS: Cascading Style Sheets
Madam Hazwani binti Rahmat
>> CSS Rules Selection
Introduction to Web programming
Intro to CSS CS 1150 Fall 2016.
Introduction to web design discussing which languages is used for website designing
Cascading Style Sheets
CASCADING STYLE SHEET CSS.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
CS134 Web Design & Development
Cascading Style Sheets
Tutorial 3 Working with Cascading Style Sheets
Web Design & Development
Cascading Style Sheets - Building a stylesheet
Cascading Style Sheets
4.01 Cascading Style Sheets
Web Client Side Technologies Raneem Qaddoura
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Cascading Style Sheets Controlling the Display Of Web Content

Why use style sheets  Separate structure from presentation  HTML files less complex  One style sheet for an entire site keeps the styling consistent across different pages  Different users can have different style sheets  Can have different style sheets for different media (print vs. screen e.g.)

CSS Style Sheets  Style sheets are used to specify the presentation style of a web document.  Cascading Style Sheet (CSS) is a language for specifying presentation style  Overseen by W3C 

Components of CSS  Style declarations  property : value  Selectors determine which properties are assigned to different HTML elements  Inheritance and cascading rules control what properties affect child elements

Style Rule selector { property 1 : value 1 ; property 2 : value 2 ; … property n : value n } h1 {font-size: large; color : #009 }

Where do the rules go?  Separate file (with.css extension)  Use element to attach style sheet to html file  In a element in the of the HTML document

Attached Style Sheet <link rel="stylesheet" type="text/css" href="style.css"> … in style.css … h2 { font-size: 150% } …

Style Element body { font-size: small } h1 {font-size: large; color: #009 } …

Selectors  Element: comma-separated list of tag names  can use * to select all elements  Class: tag.classname to select all elements with class=classname  Attribute: tag[attr] or tag[attr="value"] to select elements with a particular attribute or attribute value

More selectors  Id : #idName to select elements with particular id attribute  Contextual: a img  Pseudoclass: :link :active :visited :hover  Pseudoelement: p:first-letter p:first-line

Properties  color and background - foreground and background color, image (with position and repeat)  text - color, spacing, alignment, decoration, indentation  font - size, style  box properties - margins, padding, borders (color, style, width)  classification - display (block, in-line, list), list markers, white-space handling

Margin, Border, Padding  Block boxes  Inline boxes

Sources  Wikipedia   W3 Schools   Complete CSS Guide (online version)  tutorial/index.html tutorial/index.html  WDG Guide to Cascading Stylesheets 

favicons  Make a custom icon that shows up in the title bar of the browser and in the bookmark list.  Create a 16x16 bit image file  acceptable formats: gif, png, the windows ico  Put it in your public_html directory  Add link element(s) to the head element 