UNDERSTANDING CSS: THINKING INSIDE THE BOX The Cottage Garden The cottage garden is a distinct style of garden that uses an informal design, dense planting.

Slides:



Advertisements
Similar presentations
1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
Advertisements

Table, List, Blocks, Inline Style
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Intro To Cascading Style Sheets By Mario Yannakakis.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
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
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.
Part 2 Introduction to CSS. CSS Syntax – class selector 1 With the class selector you can define different styles for the same type of HTML element. You.
Introduction to CSS. What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Today’s objectives  Element relations – tree structure  Pseudo classes  Pseudo elements.
End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science
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.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
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.
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.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
4.01 Cascading Style Sheets
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
A really fairly simple guide to: mobile browser-based application development (part 2, CSS) Chris Greenhalgh G54UBI / Chris Greenhalgh
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
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.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
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.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
INTRODUCING CSS What CSS does How CSS works Rules, properties, and values.
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.
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 Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
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.
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.
CS3220 Web and Internet Programming CSS Basics
Style Sheets.
The Internet 10/11/11 Fonts and Colors
4.01 Cascading Style Sheets
CSS Rule Selector Declaration Block Value Attribute Name body {
CX Introduction to Web Programming
Cascading Style Sheets (CSS)
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.
Website Design 3
Intro to CSS CS 1150 Spring 2017.
The Internet 10/13/11 The Box Model
Cascading Style Sheets Color and Font Properties
Introduction to Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
The Internet 10/6/11 Cascading Style Sheets
Cascading Style Sheets
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
Made By : Lavish Chauhan & Abhay Verma
4.01 Cascading Style Sheets
Presentation transcript:

UNDERSTANDING CSS: THINKING INSIDE THE BOX The Cottage Garden The cottage garden is a distinct style of garden that uses an informal design, dense planting and a mixture of ornamental and edible plants. The Cottage Garden originated in England and its history can be traced back for centuries, although they were re-invented in 1870's England, when stylized versions were formed as a reaction to the more structured and rigorously maintained English estate gardens. The earliest cottage gardens were more practical than their modern descendants, with an emphasis on vegetables and herbs, along with some fruit trees.

p { font-family: Arial;} CSS ASSOCIATES STYLE RULES WITH HTML ELEMENTS

p { font-family: Arial;} CSS ASSOCIATES STYLE RULES WITH HTML ELEMENTS SELECTOR

p { font-family: Arial;} CSS ASSOCIATES STYLE RULES WITH HTML ELEMENTS SELECTOR DECLARATION

h1, h2, h3 { font-family: Arial; color: yellow;} CSS PROPERTIES AFFECT HOW ELEMENTS ARE DISPLAYED

h1, h2, h3 { font-family: Arial; color: yellow;} CSS PROPERTIES AFFECT HOW ELEMENTS ARE DISPLAYED PROPERTY

h1, h2, h3 { font-family: Arial; color: yellow;} CSS PROPERTIES AFFECT HOW ELEMENTS ARE DISPLAYED PROPERTY VALUE

HTML From Garden to Plate A potager is a French term for an ornamental vegetable or kitchen garden... What to Plant Plants are chosen as much for their functionality as for their color and form... INTRODUCING CSS

RESULT

CSS body { font-family: Arial, Verdana, sans-serif;} h1, h2 { color: #ee3e80;} p { color: #665544;} INTRODUCING CSS

CSS body { font-family: Arial, Verdana, sans-serif;} h1, h2 { color: #ee3e80;} p { color: #665544;} INTRODUCING CSS Change the font used

CSS body { font-family: Arial, Verdana, sans-serif;} h1, h2 { color: #ee3e80;} p { color: #665544;} INTRODUCING CSS Change the color of the headings

CSS body { font-family: Arial, Verdana, sans-serif;} h1, h2 { color: #ee3e80;} p { color: #665544;} INTRODUCING CSS Change the color of the paragraphs

RESULT

HTML Using External CSS Potatoes There are dozens of... USING EXTERNAL CSS

HTML Using External CSS Potatoes There are dozens of... USING EXTERNAL CSS

HTML Using External CSS Potatoes There are dozens of... USING EXTERNAL CSS

HTML Using External CSS Potatoes There are dozens of... USING EXTERNAL CSS

CSS Using Internal CSS body { font-family: arial; background-color: #rgb(185,179,175);} h1 { color: rgb(255,255,255);} USING INTERNAL CSS

CSS SELECTORS Universal* {} Typeh1, h2, h3 {} Class.note {} p.note {} ID #introduction {}

CSS SELECTORS Childli>a {} Descendentp a {} Adjacent sibling h1+p {} General sibling h1~p {}

CSS * { font-family: Arial; color: #333333;} h1 { font-family: "Courier New", monospace;} i {color: green;} i {color: red;} p b {color: blue !important;} p b {color: violet;} HOW CSS RULES CASCADE

RESULT

CSS body { font-family: Arial, sans-serif; color: #665544; padding: 10px;}.page { border: 1px solid #665544; background-color: #efefef; padding: inherit;} INHERITANCE

RESULT

Same CSS can be used for every page of website WHY USE EXTERNAL STYLE SHEETS

No need to copy style code into each webpage WHY USE EXTERNAL STYLE SHEETS

Changes to CSS automatically apply to the entire website WHY USE EXTERNAL STYLE SHEETS

Faster download time for subsequent pages WHY USE EXTERNAL STYLE SHEETS

Easier for many people to create new pages in same style WHY USE EXTERNAL STYLE SHEETS

Several different versions DIFFERENT VERSIONS OF CSS & BROWSER QUIRKS

Browsers not implemented all features DIFFERENT VERSIONS OF CSS & BROWSER QUIRKS

Older browsers do not support each property DIFFERENT VERSIONS OF CSS & BROWSER QUIRKS

Important to test DIFFERENT VERSIONS OF CSS & BROWSER QUIRKS

Some browsers have "bugs" or "quirks" DIFFERENT VERSIONS OF CSS & BROWSER QUIRKS

CSS treats each HTML element as if it appears inside its own box and uses rules to indicate how that element should look. SUMMARY

Rules are made up of selectors (to specify which elements the rule applies to) and declarations (to say what these elements should look like). SUMMARY

Different types of selectors allow you to target your rules at different elements. SUMMARY

Declarations are made up of two parts: the properties of the element that you want to change, and the values of those properties. SUMMARY

CSS rules usually appear in a separate document, although they may appear within an HTML page. SUMMARY