Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.

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

Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Cascading Style Sheets Please use speaker notes to get complete information! Cascading Style Sheets.
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:
1 CSS Styling with Fonts and Colors. 2 CSS Cascading Style Sheets and fonts CSS provides Style or Presentation options for our html pages CSS properties.
Cascading Style Sheets (CSS) Why do we need them? Separate structure from browser presentation There are many HTML presentation attributes –We want to.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Workshop: CSS-Part I Cascading Style Sheets add style to your HTML web pages.
1 Cascading Style Sheets Cascading Style Sheets sound intimidating. In reality, however, CSS is one of the most convenient tools available to Web developers.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
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.
WEB PAGES: CREATING AND MAINTAINING ** Tom Keane & Mayis SeapanInstructors: HTML Tags to format your text.
Computing Concepts: CSS. Aims  To understand the uses of css  To understand the different types of css  To be able to create a css file  To be able.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
HIGHER COMPUTING CSS. WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
CP476 Internet Computing Lecture 7 HTML & CSS 1 HTML HyperText Markup Language (HTML) is an application of Standard Generalized Markup Language (SGML)
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 09: Cascade Style Sheets - Spring 2011.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
Cascading Style Sheets " Provide means to control and change presentation of HTML documents. " Allow the user to impose a standard style. " Three levels.
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.
1 WDMD 170 – UW Stevens Point WDMD 170 Internet Languages eLesson: CSS Introduction to Style Sheets (NON-audio version) © Dr. David C. Gibbs
CSS – Cascading Style Sheets Fred Durao
Using Cascading Style Sheet As you create more web pages, you may wish to impose a consistent look for all of your web pages or for group of related pages.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
CASCADING STYLE SHEETS. Chapter 3 Objectives Customize HTML elements Specify Font characteristics Classes Tag style Inline and block-level elements External.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
CO1552 – Web Application Development Cascading Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Files you will need ... Black Goose Bistro Summer Menu
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
Advanced Web Development Instructor: Thomas Bombach.
Colors & Fonts Building a Website Lesson 7. Font Font The tag specifies the font face, font size, and color of text. The tag can have any or all of these.
CSS with XHTML Please use speaker notes for additional information!
Cascading Style Sheets
1 Web Development CSS (Cascading Style Sheet). 2 1.Setting rules for multiple elements To decrease the amount of typing for setting rules for multiple.
CS543: WEB APPLICATION PROGRAMMING Lab 1: HTML tags & SW installation Computer Science Department.
CSS for Styling CS The good, the bad and the… ugly!  Tags such as b, i, u, and font are discouraged in strict XHTML  Why is this bad? CS380 2.
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.
Developing Web Applications with HTML and CSS “Selectors and Properties”
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
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.
Cascading Style Sheets (CSS)
CSS Cascading Style Sheets *referenced from
Basic Webpage Design Cascading Style Sheet (CSS).
Font-Family, Color and Background. Basics  CSS rule: Selector (multiple separated by, ) Declaration (multiple separated by ; ) Example: p { color: red;
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
CSS DHS Web Design. Location Between the & Start with – End with –
CSS Cascading Style Sheets. Session Checklist ► Learn why style sheets are needed and their advantages and disadvantages ► Learn the format of a style.
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.
Creating Your Own Webpage
Cascading Style Sheets
Stylin’ with CSS.
Stylin’ with CSS.
Stylin’ with CSS.
Presentation transcript:

Stylin’ with CSS

2 Topics What is CSS? Why CSS? CSS Examples

3 What is CSS? Stands for Cascading Style Sheets Used to change the “presentation” of a Web page Used in conjunction with HTML in several ways Inline -- embedded within the HTML element Internal -- placed within the header information External -- coded in a separate document Allows style control of multiple pages all at once

4 HTML vs. CSS HTML intended to show what the text is being used for Defines its semantic meaning Designed to say things like “This is a paragraph” not “This is a paragraph that is centered with a font color of blue” CSS used for presentation only Defines how the HTML should be displayed

5 Internal Style Placed in the header of the page between the … tags. Contains styles that are used throughout the whole page rather than on a single tag. Enclose each “rule” in the … tag.

6 Internal Style Example CMSC104 HTML Template h1{ font-family: verdana; text-align: center; }

7 A Closer Look at the Style h1{ font-family: verdana; text-align: center; } selector property value rule

8 Changing the Font Face Use the font-family property Will only display fonts already installed on the end user’s computer If a font-family is not specified, displays the browser’s default font, usually Times New Roman. Can give more than one value in the CSS, just in case To see a list of Web fonts: More information than you ever wanted to know about fonts:

9 Font Example CMSC104 HTML Template body{ font-family: verdana, helvetica, arial, sans-serif; } Do you like this font?

10 Font Example Screenshot

11 Working with Color background-color -- changes the background color color -- changes the text color Can be applied to most selectors. ie: body, p, etc... black lime maroon purple white olive navy teal silver green red fuchsia gray yellow blue aqua orange Chart of possible CSS color values

12 Color Example CMSC104 HTML Template body{ background-color: black; color: orange; } Happy Halloween!!

13 Color Example Screenshot

14 Changing the Font Size Sample UsagePossible values font-size: 14pt;Can use number and unit (as in 12pt) or keywords: xx-small, x-small, small, medium, large, x-large, xx-large. (There are other possibilities but we won’t be discussing them now.)

15 Aligning text Sample UsagePossible values text-align: center;left, right, center, justify

16 CSS for Emphasis Sample UsagePossible values font-style: italic;normal, italic, oblique font-weight: bold;normal, bold, bolder, lighter

17 CSS Comments You can place a comment in CSS by using the following syntax: /* body layout */ body{ background-color: black; color: orange; }

18 Example with Multiple Rules CMSC104 CSS Example body{ color: blue; } h1{ color: red; } What color is this Heading? What color am I?

19 Multiple Rule Screenshot