INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Advertisements

Today CSS HTML A project.
© 2004, Robert K. Moniot Chapter 6 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.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
กระบวนวิชา 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.
© 2010, Robert K. Moniot Chapter 5 CSS : Cascading Style Sheets 1.
Tutorial 5 Working with the Box Model. XP Objectives Understand the box model Create padding, margins, and borders Wrap text around an image Float a block-level.
Working with Cascading Style Sheets
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 4 Formatting Text. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Create a spread heading Indent text Change the line spacing.
Chapter 6 Web Typography
Week 7 Web Typography. 2 Understanding Type Design Principles.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
4.01 Cascading Style Sheets
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
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.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
HTML/CSS Hyper Text Markup Language. CSS Cascading Style Sheets.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Cascading Style Sheet (CSS)
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
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.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Cascading Style Sheets
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
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.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
CSS: Cascading Style Sheets Part II. Style Syntax.
CSS Cascading Style Sheets *referenced from
Basic Webpage Design Cascading Style Sheet (CSS).
Tutorial 3 Designing a Web Page with CSS
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
CIS 4004: Web Based IT (CSS) Page 1 © Dr. Mark Llewellyn CIS 4004: Web Based Information Technology Fall 2012 Cascading Style Sheets (CSS) Department of.
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.
CSS.
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
Using Cascading Style Sheets Module B: CSS Structure
Intro to CSS CS 1150 Fall 2016.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Intro to CSS CS 1150 Spring 2017.
CSS Style Sheets: Intro
Cascading Style Sheets™ (CSS)
Presentation transcript:

INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages

XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Use classes to style several tags Identify the differences between dependent and independent classes Apply classes to text Use external style sheets to format several pages Create a spread heading Position text to the left, center, or right

XP Objectives Identify text attributes to avoid Use the CSS pseudo-elements :first-letter and :first-line Identify CSS filters Use the tag Apply special effects to text using CSS filters Create and apply an independent class New Perspectives on Blended HTML, XHTML, and CSS3

XP Creating and Using Classes Dependent classes are declarations that let you style the same tag several ways Apply the style by coding the word class followed by an equal sign and the name of the class just to the right (and within) the element selector itself: Unplug the appliance before making any repairs. New Perspectives on Blended HTML, XHTML, and CSS4

XP Creating and Using Classes Independent classes are declarations that let you style any tag several ways An independent class selector is preceded by the period flag character, like this:.center { New Perspectives on Blended HTML, XHTML, and CSS5

XP Creating and Using Classes New Perspectives on Blended HTML, XHTML, and CSS6 You then code the declarations, just as you would for any other style:.center { color: white; background-color: navy; text-align: center; } Using the class in your code is called applying a style

XP Creating and Using Classes New Perspectives on Blended HTML, XHTML, and CSS7 use ID selectors for formatting a single particular instance on a Web page where you want to style an element Code an ID in the same way you code an independent class, except that instead of using the period as the flag character, you use the pound symbol ( # ) #copyright { font-variant: small-caps; }

XP Creating External Styles Inline styles: Override both embedded and external styles Embedded styles: Override external styles External styles: Do not override either embedded or inline styles New Perspectives on Blended HTML, XHTML, and CSS8

XP Creating External Styles New Perspectives on Blended HTML, XHTML, and CSS9 ID selectors are more specific than class selectors (whether dependent or independent) Element selectors (also known as type selectors), are the least specific

XP Linking an HTML File to an External Style Sheet New Perspectives on Blended HTML, XHTML, and CSS10 Rel stands for relationship – The rel attribute value is always stylesheet Href stands for hypertext reference – The href attribute value is the name of the CSS file to which you are linking The type attribute value is always text/css

XP Linking an HTML File to an External Style Sheet New Perspectives on Blended HTML, XHTML, and CSS11

XP Creating the External Style Sheet Code New Perspectives on Blended HTML, XHTML, and CSS12 An external style sheet document does not have any HTML code External style sheets usually begin with a comment that identifies the style sheet, such as its purpose, the author, the date last revised, and so forth

XP Using the Text Properties New Perspectives on Blended HTML, XHTML, and CSS13

XP Creating the External Style Sheet Code Setting your own values in the body element overrides any browser default values New Perspectives on Blended HTML, XHTML, and CSS14

XP Using the Text Properties New Perspectives on Blended HTML, XHTML, and CSS15 Add white space between letters and words – Use the letter-spacing property to control the amount of white space between letters. – Use the word-spacing property to create white space between words

XP Using the Text Properties The text-align property takes the following values: – left (the default) – center – right – Justify Indenting text p { text-indent: 2em; } blockquote {text-indent: 7%; } New Perspectives on Blended HTML, XHTML, and CSS16

XP Using the Text Properties Margin properties control white space – margin-top: – margin-right: – margin-bottom: – margin-left: Hanging indent – the first line of a paragraph is at the left edge of the window and the remaining lines of the paragraph are indented from the left edge of the window New Perspectives on Blended HTML, XHTML, and CSS17

XP Using the Text Properties Change case h3 { text-transform: capitalize; } Text decoration – underline – overline – line-through – blink New Perspectives on Blended HTML, XHTML, and CSS18

XP Creating Pseudo-Elements New Perspectives on Blended HTML, XHTML, and CSS19 The pseudo-elements create an element selector where none existed before The colon you see before the element names is required and is part of the pseudo-element name Both the :first-letter and :first-line pseudo- elements work only with block-level elements

XP Creating Pseudo-Elements Limit your styles to the following properties: – the font properties – the color and background-color properties – the margin, padding, and border properties – the text-transform, font-variant, and line-height properties New Perspectives on Blended HTML, XHTML, and CSS20

XP Creating Pseudo-Elements The :first-letter pseudo-element is used to create a drop cap (aka initial cap) The :first-line pseudo- element formats just the first line of a paragraph New Perspectives on Blended HTML, XHTML, and CSS21

XP Creating Pseudo-Elements The cascade determines which style prevails based upon its source or location New Perspectives on Blended HTML, XHTML, and CSS22

XP Using Filters Proprietary code functions on only one hardware or software platform, such as Internet Explorer or Firefox Both have developed proprietary code that can add special effects to text, known as filters. New Perspectives on Blended HTML, XHTML, and CSS23

XP Using Filters New Perspectives on Blended HTML, XHTML, and CSS24

XP Using Filters New Perspectives on Blended HTML, XHTML, and CSS25

XP Working With an Independent Class New Perspectives on Blended HTML, XHTML, and CSS26

XP Working With an ID Selector New Perspectives on Blended HTML, XHTML, and CSS27