CSU - DCE 0715 - Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Color Instructor: Joseph.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets. Next Level Cascading Style Sheets (CSS) - control the look and feel of your HTML documents in an organized and efficient manner.
Advertisements

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
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
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 Link Styling. The Anchor Element: Link text between the opening and closing can be styled using CSS. Some of the properties that can be set are: font-family,
CSS cont. October 5, Unit 4. Padding We can add borders around the elements of our pages To increase the space between the content and the border, use.
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา 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.
Introduction to CSS CSS Backgrounds - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Colors & Backgrounds Instructor: Joseph DiVerdi,
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.
Design, Formatting, CSS, & Colors 27 February, 2011.
Design, Formatting, CSS, & Colors September 9, 2010.
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.
More HTML Chapter 4. 2 Nesting Tags How do you write the following in HTML? The wrong way: This is really, REALLY fun ! Tags must be correctly nested.
4.01 Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Cascading Style Sheets 1 Color and Backgrounds. Cascading Style Sheets 2 Color and Backgrounds Computer color basics Expression of color values using.
Link and Table in HTML. Statistics HTML review The two faces of a HTML file In a notepad program. In a internet browser program. The function of HTML.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
Introduction to CSS CSS Syntax - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Syntax & Semantics Instructor: Joseph DiVerdi,
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Softsmith Infotech CSS. Softsmith Infotech CSS Cascading Style sheets Enhances look and feel of the site Adds more features to plain HTML Can define properties.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
 To specify blue as the background color for a page, put bgcolor=“blue” inside the tag. Of course, you can use many colors other than blue. You can choose.
CSU - DCE Webmaster I HTML - Tables - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML - Introduction to Tables Instructor:
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.
12/20/20151 Color Fall, 2010 Modified by Linda Kenney 10/26/10.
HTML & Color How to Use Color  Backgrounds-  Usually a light color is best  Should have a color based on a theme or plan  Can have a dark.
Cascading Style Sheets I Embedded Style Sheets. Page Design ICSS 2Instructor: Sean Griffin What is a Style Sheet? A style sheet is a text file that contains.
Developing Web Applications with HTML and CSS “Selectors and Properties”
Webmaster II Introductions - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Webmaster II Instructor: Joseph DiVerdi, Ph.D., MBA.
CSU - DCE Introduction to CSS CSS Length - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Length Instructor:
CSU - DCE Introduction to CSS CSS URLs - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying URLs Instructor: Joseph.
Web Design (15) CSS Opacity, Link Colours & Background Images.
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.
ColorsColors. Color Keywords/Names 140 color keywords/names are defined in the HTML and CSS color specification –17 standard colors (HTML accepts 16 of.
CSU - DCE Introduction to CSS CSS Text - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Text Control Instructor: Joseph.
Links All CSS properties can be applied on links (i.e. change colors, fonts, underline, etc). The new thing is that CSS allows you to define these properties.
CSU - DCE Webmaster I HTML & URLs - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites With HTML - Using Effective Links Instructor:
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
Chapter 13 Colors & backgrounds.
4.01 Cascading Style Sheets
Web Development & Design Foundations with HTML5 8th Edition
Cascading Style Sheets
Lecture 9. Cascading Style Sheets
Lecture 3 Sarsenova Zhibek.
Cascading Style Sheets
Web Development & Design Foundations with HTML5
>> Dynamic CSS Selectors
Tutorial 3 Working with Cascading Style Sheets
What Color is it?.
HTML LINKS
Cascading Style Sheets
Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements
4.01 Cascading Style Sheets
Presentation transcript:

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Cascading Style Sheets - Specifying Color Instructor: Joseph DiVerdi, Ph.D., M.B.A.

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Colors Several Methods for Specifying Color Identical to HTML Methods Caveat: –CSS is not a precise layout language –HTML is not a precise layout language –There are unavoidable differences among OSes –There are unavoidable differences among browsers –With this information you'll be able to do the best work possible

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Colors Borders, Text, & Backgrounds can possess color specifications Color Specification Methods: –Named Colors (aka Color Keywords) –RGB Colors - Using Decimal Numbers Using Percentages Using Hexadecimal Numbers Using Short Hexadecimal Numbers

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Named Colors Named Color Choices: aquablackbluefuschia graygreenlimemaroon navyolivepurplered silvertealwhiteyellow The Original Windows VGA Color Set

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Named Colors There are no exactly defined RGB values for these keywords –It is Up To Browser Developers to Decide What They Might Mean –It is Up to BIOS Developers to Decide What They Might Mean –It is Up to Monitor Developers to Decide What They Might Mean

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors Several equivalent number systems –Percentage:0-100% –Decimal Number:0-255 –Hexadecimal Number:00-FF –Short Hexadecimal Number:0-F All schemes deconstruct every possible color into varying amounts of Additive Primaries –Red, Green, & Blue Each scheme uses a different numbering scheme to define the amounts

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors Percentages: –0-100% Red –0-100% Green –0-100% Blue Syntax: H1 { color: rgb( 20%, 20%, 20%); }/* dark gray */ H2 { color: rgb(100%, 0%, 0%); }/* red */ H3 { color: rgb(100%, 40%, 0%); }/* orange */ H4 { color: rgb(100%, 100%, 0%); }/* yellow */ H5 { color: rgb( 0%, 100%, 0%); }/* green */ H6 { color: rgb(100%, 0%, 100%); }/* purple */ H6 { color: rgb(rrr, ggg, bbb); }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors Decimal Numbers: –0-255 Red –0-255 Green –0-255 Blue Syntax: H1 { color: rgb( 51, 51, 51); }/* dark gray */ H2 { color: rgb(255, 0, 0); }/* red */ H3 { color: rgb(255, 102, 0); }/* orange */ H4 { color: rgb(255, 255, 0); }/* yellow */ H5 { color: rgb( 0, 255, 0); }/* green */ H6 { color: rgb(255, 0, 255); }/* purple */ H6 { color: rgb(rrr, ggg, bbb); }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors Hexadecimal Numbers: –00-FF Red –00-FF Green –00-FF Blue Syntax: H1 { color: #333333; }/* dark gray */ H2 { color: #FF0000; }/* red */ H3 { color: #FF6600; }/* orange */ H4 { color: #FFFF00; }/* yellow */ H5 { color: #00FF00; }/* green */ H6 { color: #FF00FF; }/* purple */ H1 { color: #rrggbb; }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC RGB Colors Short Hexadecimal Numbers: –0-F Red –0-F Green –0-F Blue Syntax: H1 { color: #333; }/* dark gray */ H2 { color: #F00; }/* red */ H3 { color: #F60; }/* orange */ H4 { color: #FF0; }/* yellow */ H5 { color: #0F0; }/* green */ H6 { color: #F0F; }/* purple */ H1 { color: #rgb; }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Color Problems Colors vary across different OSes & Browsers Restricting color choices to so-called Web Safe Colors increases the consistency of results Web Safe Colors –multiples of 20% 0, 20, 40, 60, 80, 100% –multiples of , 51, 102, 153, 204, 255 –multiples of , 33, 66, 99, CC, FF –multiples of , 3, 6, 9, C, F

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Color Effected Properties background-colorsets background color of element border-colorsets foreground color of overall border of element colorsets foreground color of element

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Body Colors BODY tag accepts several color attributes –text color –background color (or image) –link unvisited or not yet followed –active (link) depressed mouse cursor –visited (link) been there, done that, got the T-shirt, saw the movie... CSS properties can be used to replace these attributes

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Body Colors BODY { color: black; background-color: white; } A:LINK { color: red; } A:VISITED { color: purple; } A:ACTIVE { color: blue; }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Body Colors BODY { color: black; background-color: white; } A:link { color: red; } A.external:link { color: green; } A:visited { color: purple; } A.external:visited { color: aqua; } A:active { color: blue; }...

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Specifying Element Colors Each element can have foreground and background colors specified It is also possible to specify "transparent" to allow the BODY background to show Transparent is the default H1 { color: black; background-color: white; } H1 { color: black; background-color: transparent; }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Example BODY { background-color: aqua; color: black; } A { background-color: transparent; color: blue; } H1 { background-color: rgb(255, 100%, 255); color: rgb(100%, 0%, 0%); }

CSU - DCE Introduction to CSS CSS Colors - Fort Collins, CO Copyright © XTR Systems, LLC Personal Web Pages Apply these methods to your Web Site Modify your style sheet to apply each method to some element Verify that each method works in your hands