Cascading Style Sheets Controlling the Display Of Web Content.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

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.
กระบวนวิชา 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.
Cascading Style Sheets Controlling the Display Of Web Content.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
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
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
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
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
 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.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
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.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 8: Working with Style Sheets.
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.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
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.
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
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.
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.
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
>> The “Box” Model
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 SHEET CSS.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
DynamicHTML Cascading Style Sheet Internet Technology.
Tutorial 3 Working with Cascading Style Sheets
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Web Design & Development
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
Web Client Side Technologies Raneem Qaddoura
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  background - color, image (with position and repeat)  text - color, background color, spacing, alignment, decoration, indentation  borders - color, style, width  font - size, style  margins and padding - each side independently if desired  lists - markers

Margin, Border, Padding  Block boxes  Inline boxes

Sources  Web Design and Programming by Paul S. Wang and Sanda S. Katila  Wikipedia   W3 Schools   Complete CSS Guide (online version)  tutorial/index.html

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 

How to make an ico image  Create a 16x16 image that you can open with gimp (or create it in gimp if you know how)  From gimp, do save as with a.ppm extension  do ppmtowinicon -output image.ico image.ppm