Session 3.1.. Objectives What is CSS? Define CSS syntax Learn about the authoring options Add comments to a CSS Defining color in CSS.

Slides:



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

Cascading Style Sheets
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
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
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.
กระบวนวิชา 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.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
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.
Workshop: CSS-Part I Cascading Style Sheets add style to your HTML web pages.
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,
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
CSS Style Rules Guang Tong, Zhan L;lo’p[ Css Style Rule Guang Tong Zhan Three ways to insert CSS 1 External style sheet 2 Internal style sheet 3 Inline.
HTML/CSS Hyper Text Markup Language. CSS Cascading Style Sheets.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Bare bones slide show. The format is text files, with.htm or.html extension. Hard returns, tabs, and extra spaces are ignored. DO NOT use spaces in file.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
 Use the think diagram … ISP Server.
Cascading Style Sheets
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.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
Cascading Style Sheets (CSS) EXPLORING COMPUTER SCIENCE – LESSON 3-5.
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
Tutorial 3 Designing a Web Page with CSS
LT: I can use CSS to decorate a web page. Do Now: Get your storyboard, and log in to winhome. Write our a list of colors you want in your website. (Minimum.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
What is CSS? A set of style rules that tell the web browser how to present a web page or document. – In earlier versions of HTML, style characteristics,
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.
Designing a Web Page with CSS Creating a Web Site for a Rural Farm.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
4.01 Cascading Style Sheets
Web Development & Design Foundations with HTML5 8th Edition
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Madam Hazwani binti Rahmat
Cascading Style Sheets
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Intro to CSS CS 1150 Fall 2016.
Web Development & Design Foundations with HTML5
Introduction to web design discussing which languages is used for website designing
Website Design 3
Intro to CSS CS 1150 Spring 2017.
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D.
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
Basics of Web Design Chapter 4 Cascading Style Sheets Basics Key Concepts Copyright © 2016 Terry Ann Morris, Ed.D.
Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements
4.01 Cascading Style Sheets
Presentation transcript:

Session 3.1.

Objectives What is CSS? Define CSS syntax Learn about the authoring options Add comments to a CSS Defining color in CSS

What is CSS? Cascading Style Sheets is a style sheet language developed to control the presentation of markup language documents.

Difference between HTML and CSS HTML CSS

CSS Syntax General Syntax of a CSS rule: selector { property1: value1; property2: value2; property3: value3;... }

CSS Syntax h2 { color: green; text-align: center; } body { background-color: black; }

Grouping Selectors h1 {font-weight: normal; color: blue;} h2 {font-weight: normal; color: blue;} Can be grouped: h1, h2 {font-weight: normal; color: blue;}

Authoring Options Based on style locations External Styles Embedded Styles Inline styles

External Styles

Embedded Styles

Inline Styles

Practice – Link to CSS files 1. Download Sunny Acres files. 2. Link holiday.htm to the hs_layout.css style sheet and the hs_styles.css style sheet.

Writing Comments /* Chocolate Factory Style Sheet Author: Johnny Depp Date: 02/18/2013 */

Practice - Comments 1. Add comments at the top of the hs_styles.css file.

Defining a Color in CSS Defining a color in CSS RGB triplets Hexadecimal numbers RGB triplet syntax: rgb(red, green, blue) Hexadecimal number syntax: #redgreenblue

Setting Foreground and Background Color Background Color: background-color: color; where color is a color value. Foreground Color (text color): color: color;

Practice – Setting Background Colors and Text Colors 1. Create a style rule for the page for the body page, set the background color to white. 2. Create a style rule for unordered lists within the nav element that sets the background color to the value (248, 175, 175). For every hypertext link within the navigation list, create a style that sets the font color to white. 3. The owner has placed a promotional photo in a figure box. Set the background color of figure boxes to the color value (248, 175, 175).

Including Opacity (only CSS3) rgba(red, green, blue, opacity) Examples: rgba(182, 156, 89, 0.7) rgba(45, 199, 205, 0.8)

Practice – Setting Colors including Opacity 1. For h1 headings nested within the section element, create a style rule to: a) set the background color to the value (148, 51, 62) and b) set the font color to white for older browsers and to the color value (255, 255, 255) with an opacity of 80% for newer browsers. 2. For address elements nested within the footer element, create a style rule to a) set the background to the color (148, 51, 62) and b) set the font color to white for older browsers and to the value (255, 255, 255) with 80% opacity for newer browsers.

Selecting a Color Palette: Too Tough?