CSS: text chapter 3 Stylesheet supplement. XHTML and CSS XML is concerned primarily with document content – elements and their attributes. There is technology.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Advertisements

HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Chapter 3 © 2003 by Addison-Wesley, Inc Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation.
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
Cascading Style Sheets
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
CSS Digital Media: Communication and design 2007.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
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.
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Introduction to CSS.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
HyperText Markup Language (HTML) Uses plain text to add markup instructions to a file. If you can't produce it with a standard keyboard, it can't go into.
Cascading Style Sheets Basics. Why use Cascading Style Sheets? Allows you to set up a series of rules for all pages in a site. The series may be changed.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Cascading Style Sheet CSS CS1520 Ali Alanjawi. 2 TA Information Ali Alanjawi Homepage: Office:
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
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,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
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} //
“Cascading Style Sheets” for styling WWW information DSC340 Mike Pangburn.
กระบวนวิชา 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.
Chapter 8 Creating Style Sheets.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Dr. Ahmet Cengizhan Dirican BIL 374 Internet Technologies 3. CSS.
1Computer Sciences Department. And use
Tutorial 6 By Sam INE 1020 Introduction to Internet Engineering 1 DHTML & CSS Tutorial 6.
Cascading Style Sheets Class 1, Lecture 1 Rachel A Ober
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
ALBERT WAVERING BOBBY SENG. Week 2: HTML + CSS  Quiz  Announcements/questions/etc  Some functional HTML elements.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 3.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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 Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
1 Cascading Style Sheets
Internet & World Wide Web How to Program, 5/e 1. 2.
WebD Introduction to CSS By Manik Rastogi.
CSS.
3.1 Introduction - HTML is primarily concerned with content, rather
CS3220 Web and Internet Programming CSS Basics
CSS: Cascading Style Sheets
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
Cascading Style Sheets
Software Engineering for Internet Applications
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
CIS 133 mashup Javascript, jQuery and XML
Stylin’ with CSS.
Cascading Style Sheets™ (CSS)
Presentation transcript:

CSS: text chapter 3 Stylesheet supplement

XHTML and CSS XML is concerned primarily with document content – elements and their attributes. There is technology for presenting XML. XSL can be used to generate HTML out of XML. FOP (Formatting objects) is another example, allowing XML to be presented as PDF, for example. We won’t cover any of that in this course. It is true that some XHTML tags do carry presentation information (headings and font tags, for example). CSS was developed to enhance and specify HTML presentation.

CSS1, CSS2, and CSS3 CSS1 was developed by W3C in 1996 and has been largely, but not completely, implemented by IE6 and Netscape 7. CSS2 came out in 1998 and it has only been partly implemented. CSS3 is under development. The text only covers a subset of CSS1 and CSS2 which has been implemented by one or both IE and Mozilla.

CSS “cascading” style sheets are so named because there are 3 levels, and each lower level can override a higher level in determining document presentation. Inline is the lowest level and it applies to the content of a single tag. Document level is specified in the header as an html comment and covers the entire document. External can apply to many documents.

Validator validator/validator

pseudoclass These are styles to be implemented because something happens rather than because a tag or id exists. Hover and focus are examples: hover means the mouse “hovers” over a field and focus means a field has the focus (has been selected/clicked on) Text example didn’t come in the support examples so I made my own.

my pseudo-class example input:hover {color:red;} input:focus {color:green;} name....

Showing psuedo example with hover and focus

Fonts.html text example Font properties <!-- /* Document-level style sheet */ p.big {font-size: 14pt; font-style: italic; font-family: 'Times New Roman'; } p.small {font-size: 10pt; font-weight: bold; font-family: 'Courier New'; } --> If a job is worth doing, it’s worth doing right. Two wrongs don't make a right, but they certainly can get you in a lot of trouble. <h2 style = "font-family: 'Times New Roman'; font-size: 24pt; font-weight: bold"> Chapter 1 Introduction <h3 style = "font-family: 'Courier New'; font-size: 18pt"> 1.1 The Basics of Computer Networks

Fonts in firefox

(my) External sheet /*styles.css*/ p.big {font-size: 14pt; font-style: italic; font-family:'Times New Roman';} p.small {font:10pt bold 'Courier New';} h2 {font-family:'Times New Roman';font- size: 24pt; font-weight:bold} h3 {font-family:'Courier New';font-size: 18pt}

And an html that uses it All's well that ends well A short horse is soon curried every dark cloud has a silver lining Enough is as good as a feast

In mozilla – notice I didn’t get italics

Decoration.html (text example) <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN" " <!-- decoration.html An example that illustrates several of the possible text decoration values --> Text decoration This illustrates line-through This illustrates overline This illustrates underline

Decoration.html in firefox

Inline CSS: A piece of text example sequence_types.html Sequence types Aircraft Types General Aviation (piston-driven engines) Single-Engine Aircraft Tail wheel Tricycle Dual-Engine Aircraft Wing-mounted engines Push-pull fuselage-mounted engines Commercial Aviation (jet engines) Dual-Engine Wing-mounted engines

Previous html in firefox

Inline CSS: Float picture right…Float.html in text slideshow <!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Strict//EN" " The float property <img src = "c210new.jpg" alt = "Picture of a Cessna 210" style = "float: right" /> This is a picture o…

A javascript/css example: borders.html <!-- var bordersize; bordersize = prompt("Select a table border size \n" + "0 (no border) \n" + "1 (1 pixel border) \n" + "4 (4 pixel border) \n" + "8 (8 pixel border) \n"); switch (bordersize) { case "0": document.write(" "); break; case "1": document.write(" "); break; case "4": document.write(" "); break; case "8": document.write(" "); break; default: document.write("Error - invalid choice: ", bordersize, " "); }

borders document.write(" 2001 NFL Divisional Winners "); document.write(" ", " ", " American Conference ", " National Conference ", " ", " East ", " New England Patriots ", " Philadelphia Eagles ", " ", " Central ", " Pittsburgh Steelers ", " Chicago Bears ", " ", " West ", " Oakland Raiders ", " St. Louis Cardinals ", " ", " "); // -->

Prompts users to select pixels

Borders.html

My background image example Background images body {background-image: url(fireguy0.gif);> p {margin-left: 30px; margin-right: 30px; margin-top: 50px; font-size: 14pt;} The Cessna 172 is the most common general aviation airplane in the world. …

My background image example