CASCADING STYLE SHEETS. Chapter 3 Objectives Customize HTML elements Specify Font characteristics Classes Tag style Inline and block-level elements External.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

CSS Cascading Style Sheets. Contents{ 1. What is CSS? 1. A Brief History of CSS 2. Why to use Styles? 2. Syntax 3. Cascading Order 4. Examples of Properties.
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
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} //
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Web-based Application Development Lecture 4 January 19, 2005 Anita Raja.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Web Design & Development Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS) Why do we need them? Separate structure from browser presentation There are many HTML presentation attributes –We want to.
Web-based Application Development Lecture 5 January 24, 2006 Anita Raja.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Cascading style sheets - CSS
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Formatting Text (Plus More Selectors) Learning Web Design: Chapter 12.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
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,
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
HTML/CSS Hyper Text Markup Language. CSS Cascading Style Sheets.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 09: Cascade Style Sheets - Spring 2011.
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.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
1 To Create an Internal Style Sheet 1. At the top of your HTML document, between the and tags type. 2. Type the name of the tag whose properties you wish.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
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.
Cascading Style Sheets (CSS)
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.
Class three: CSS review, backgrounds, font formatting, the box model.
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.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
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.
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,
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
Basic Webpage Design Cascading Style Sheet (CSS).
Tutorial 3 Designing a Web Page with CSS
CSCE Chapter 3 (Cascading Style Sheets) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department of Computer.
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)
Formatting Text with HTML and CSS. Summary block-level elements. Character-level elements Logical and physical style Special elements: hr,address, quotation.
CSS Details Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  To use CSS properties for fonts  Evaluate whether to use pts,
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 10: Formatting Text with Styles.
Internet & World Wide Web How to Program, 5/e 1. 2.
CS3220 Web and Internet Programming CSS Basics
Cascading Style Sheets™ (CSS)
Creating Your Own Webpage
Programming the Web using XHTML and JavaScript
CSS Style Sheets: Intro
Cascading Style Sheets™ (CSS)
CS3220 Web and Internet Programming CSS Basics
Stylin’ with CSS.
Cascading Style Sheets™ (CSS)
Cascading Style Sheets
Presentation transcript:

CASCADING STYLE SHEETS

Chapter 3 Objectives Customize HTML elements Specify Font characteristics Classes Tag style Inline and block-level elements External style sheets

The Power of Styles Review Chapter 1 –URL in browser instructs PC to request a doc –Server returns the HTML source document for URL Review Chapter 2 –Structure and content on the page; also presentation,, –Browser displayed elements in default styles In this Chapter, customize styles

Creating an Internal Style Sheet Redefine the presentation rules for an element on a single page Defined in the head element Defining the style sheet language for a element as css (cascading style sheets): h2 {color:red}

Changing the Alignment h1 {text-align:center; font-style:italic; font-size:30pt} h2 {color:red; font-size:24pt; font-variant:small-caps}

Formatting Fonts Using Styles Absolute sizes in points (24pt) Percentage (150%) Preset values of xx-small, x-small, small, medium, large, x-large, and xx-large. h1 {text-align:center; font-size:30pt}

Bold and Italic Revisited font-style:italic (or normal, oblique) h1 {text-align:center; font-style:italic; font-size:30pt} font-weight:bold (or normal, bolder, lighter, or the values 100, 200, ) h2 {text-align:center; font-weight:bolder}

Beyond Bold and Italic text-decoration text-decoration:underline (or overline, line-through, none, blink) text-transform text-transform:capitalize (or uppercase, lowercase, none) font-variant font-variant:small-caps (or none) background background:color:red (or transparent or predefined color name or valid color number)

Paragraph Styles p {font-size:14pt} text-indent:25pt (or a percentage of the line width, e.g., 10%; negative for hanging indent) line-height:20pt (or a percentage of the single-line height, e.g., 150%, or a multiplication factor, e.g., 1.5)

Font Families font-family:"Lucida","Arial" (first-choice and second- choice font names) font: italic bolder small-caps 14pt/24pt "Lucida","Arial"

One Tag, Multiple Styles: Classes Class Example p {text-align:justify; font-weight:bold} p.intro {text-align:center; color:red} This paragraph will be centered with red, bold text. This paragraph will be bold text with justified alignment.

Using Local Styles This paragraph will be uppercase and red (in addition to any other style properties that may be defined for the regular paragraph).

Creating Custom Tags span {font-size:18pt} Let me make one thing perfectly clear…

External Style Sheets

End of Chapter 3 Customize HTML elements Specify Font characteristics Classes Tag style Inline and block-level elements External style sheets