The Internet 10/6/11 Cascading Style Sheets

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Intro To Cascading Style Sheets By Mario Yannakakis.
CSS Styling CSS Box Model & CS110: Computer Science and the Internet.
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
/k/k 1212 Cascading Style Sheets Part one Marko Boon
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Cascading Style Sheets
Today CSS HTML A project.
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
1 Styles and CSS David Douglas Sam M. Walton College of Business, University of Arkansas “Connecting scholarship and research with business practice”
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
กระบวนวิชา 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.
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.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
1 Getting Started with CSS. 2 CSS Cascading Style Sheets XHTML provides structure for our documents (web pages) CSS provides Style or Presentation for.
4.01 Cascading Style Sheets
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
CO1552 – Web Application Development Cascading Style Sheets.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Slide 1 CMPS 211 Internet Programming Spring 2008 Style Sheet Building Blocks Chapter 7 & 8 4/8/08.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
CIS 228 The Internet 10/18/11 Grouping XHTML. CSS Selectors Rule: selector-group { property-declaration* } Selector-group: selector *, Selector: simple-selector.
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
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets
HTML WITH CSS.
CSS Cascading Style Sheets
CS3220 Web and Internet Programming CSS Basics
The Internet 10/11/11 Fonts and Colors
4.01 Cascading Style Sheets
An Introduction to Cascading Style Sheets
HTML WITH CSS.
CSS Rule Selector Declaration Block Value Attribute Name body {
>> Introduction to CSS
Cascading Style Sheets
IS 360 Declaring CSS Styles
CX Introduction to Web Programming
Introduction to Web programming
Intro to CSS CS 1150 Fall 2016.
UNDERSTANDING CSS: THINKING INSIDE THE BOX The Cottage Garden The cottage garden is a distinct style of garden that uses an informal design, dense.
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Introduction to Web programming
Intro to CSS CS 1150 Spring 2017.
The Internet 10/13/11 The Box Model
Software Engineering for Internet Applications
CS134 Web Design & Development
Introduction to Cascading Style Sheets (CSS)
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets
Web Development & Design Foundations with H T M L 5
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
CS3220 Web and Internet Programming CSS Basics
Creating a simple web page
CS3220 Web and Internet Programming CSS Basics
Made By : Lavish Chauhan & Abhay Verma
Web Design & Development
The Internet 10/20/11 CSS Layout
4.01 Cascading Style Sheets
Stylin’ with CSS.
Presentation transcript:

The Internet 10/6/11 Cascading Style Sheets CIS 228 The Internet 10/6/11 Cascading Style Sheets

Attaching CSS to a Web Page Style element Attribute type=”text/css” Content: one or more CSS rules Link element (empty element) Attribute rel=”stylesheet” Attribute href=”somepath/file.css” CSS file contains one or more CSS rules Both <link> and <style> belong in <head>

CSS Rules Template: selector { property : value+ ; } Selector identifies 0 or more elements in a document (Remember a document is a tree of elements) Element names can be selectors (e.g. blockquote, p, q …) Property governs an aspect of element presentation Value specifies a property (e.g. 7, 7px, 7%, red, etc.) Example: h1, q, em { background-color: maroon ; border: 1px solid blue ; }

Some CSS Properties color maroon grey background-color border border-bottom font-family sans-serif serif

Property Inheritance Some property values are inherited Some are not e.g. color, font-family Some are not e.g. border (why?) Elements pass inherited values to their children e.g. em inherits color from p Inheritance can be overridden by explicit assignment e.g. em { color: maroon ; }

Determining Property Values What is the value v of property p on element e? Is there a rule that selects e and defines p? Only one? that rule gives v More than one? take the (physically) last one Is p an inherited property? Take the value of p for e's parent Otherwise Default value To come: what if there are multiple style sheets?

The Class Attribute Distinguishes elements having the same name All Sam's must ware red hats All Sam's in the drama club must ware red hats XHTML (and HTML) Any element (in <body>) can have a class attribute e.g. <p class=”legalese”>...</p> CSS p.legalese { color: red ; } .legalese { font-size: small ; }