Cascading Style Sheets



Similar documents
Contents. Introduction Downloading the Data Files... 2

Creating a Resume Webpage with

Contents. Downloading the Data Files Centering Page Elements... 6

{color:blue; font-size: 12px;}

But have you ever wondered how to create your own website?

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Web Authoring CSS. Module Descriptor

HTML and CSS. Elliot Davies. April 10th,

Lesson Overview. Getting Started. The Internet WWW

CST 150 Web Design I CSS Review - In-Class Lab

Introduction to Web Technologies

Simply download Beepip from and run the file when it arrives at your computer.

Internet. Internet is the network of networks i.e. a global network which make WWW (world wide web) Seema Sirpal Delhi University Computer Centre

IT3504: Web Development Techniques (Optional)

IT3503 Web Development Techniques (Optional)

ICT 6012: Web Programming

Web Design with CSS and CSS3. Dr. Jan Stelovsky

01/42. Lecture notes. html and css

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

Web Design and Development ACS-1809

KOMPOZER Web Design Software

Web Developer Jr - Newbie Course

What is a Web Browser? Web Site Functionality. A client program that uses HTTP to communicate with web servers.

Advanced Drupal Features and Techniques

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

ITNP43: HTML Lecture 4

Oct 15, Internet : the vast collection of interconnected networks that all use the TCP/IP protocols

Introduction to Adobe Dreamweaver CC

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Appendix H: Cascading Style Sheets (CSS)

Dolphin Dynamics. Document Configuration: HTML Editor

Using the Content Management System

Outline of CSS: Cascading Style Sheets

Microsoft Expression Web

Base template development guide

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

... Asbru Web Content Management System. Getting Started. Easily & Inexpensively Create, Publish & Manage Your Websites

Designing HTML s for Use in the Advanced Editor

Mastering the JangoMail EditLive HTML Editor

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Microsoft Expression Web Quickstart Guide

4.2 Understand Microsoft ASP.NET Web Application Development

Web Hosting. Definition. Overview. Topics. 1. Overview of the Web

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

WEB PAGE, DIGITAL/MULTIMEDIA AND INFORMATION RESOURCES DESIGN

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

RIT Message Center Compose and Send Messages

Dreamweaver Tutorial #1

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

HTML, CSS, XML, and XSL

Website Builder Documentation

LaGuardia Community College Thomson Ave, Long Island City, New York Created by ISMD s Dept. Training Team. Overview

MadCap Software. Import Guide. Flare 11

Software Requirements Specification For Real Estate Web Site

Basic tutorial for Dreamweaver CS5

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

MCH Strategic Data Best Practices Review

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workshop Session Plan

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

Web Development I & II*

Short notes on webpage programming languages

Caldes CM2: Marketing s Support Document v1.12

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

MadCap Flare and Translation: Five Things to Consider When Developing Multilingual Content

WEB DEVELOPMENT IA & IB (893 & 894)

Dreamweaver. Introduction to Editing Web Pages

AJAX The Future of Web Development?

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

HTML TIPS FOR DESIGNING

Intro to Web Development

Using Adobe Dreamweaver CS4 (10.0)

Coding Standards for Web Development

Virtual Exhibit 5.0 requires that you have PastPerfect version 5.0 or higher with the MultiMedia and Virtual Exhibit Upgrades.

Using and creating Crosstabs in Crystal Reports Juri Urbainczyk

Introduction to Web Technology. Content of the course. What is the Internet? Diana Inkpen

Website Development. 2 Text. 2.1 Fonts. Terry Marris September We see how to format text and separate structure from content.

Fast track to HTML & CSS 101 (Web Design)

Dreamweaver: Getting Started Website Structure Why is this relevant?

Website 101: Visual Design And Content

Creating Web Pages with Dreamweaver CS 6 and CSS

Wakanda Studio Features

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Course: CSC 224 Internet Technology I (2 credits Compulsory)

Systems Analysis Input and Output 1. Input and Output

GUIDE TO CODE KILLER RESPONSIVE S

UNPAN Portal Content Management System (CMS) User Guide

By : Khalid Alfalqi Department of Computer Science, Umm Al-Qura University

Transcription:

Cascading Style Sheets DESIGNING FOR THE WEB Third Edition SAMPLE DOCUMENT

Cascading Style Sheets DESIGNING FOR THE WEB Third Edition

Cascading Style Sheets DESIGNING FOR THE WEB Third Edition Håkon Wium Lie Bert Bos

Copyright 2005 Håkon Wium Lie and Bert Bos

Table of Contents Table of Contents Table of Contents... vii Preface... viii Chapter 1 The Web and HTML...1 The Web...1 Development of the Web...2 Adding images...2 Chapter 2 CSS...3 Rules and Style Sheets...3 Index...5 vii

Preface This is a sample document whose purpose is to show how CSS can be used to print a book. To make the document more lively, excerpts from the third edition of Cascading Style Sheets designing for tbe Web has been included.1 The excerpts have been selected for their example values and they appear, in this document, out of order. The PDF version of this document is produced directly from the HTML and CSS sources by the Prince formatter. We encourage you to reuse the structure, markup and style sheet of this sample document. In your own book, however, you need to provide the content yourself. Håkon Wium Lie & Bert Bos Oslo/Antibes November 2005 1. That book was produced using the methods described in the document, and it was published by Addison-Wesley in 2005. viii

Chapter 1: The Web and HTML Chapter 1 The Web and HTML The box CSS Specifications on page 4 lists the different CSS specifications. Cascading Style Sheets (CSS) represent a major breakthrough in how Web-page designers work by expanding their ability to control the appearance of Web pages, which are the documents that people publish on the Web. For the first few years after the World Wide Web (the Web) was created in 1990, people who wanted to put pages on the Web had little control over what those pages looked like. In the beginning, authors could only specify structural aspects of their pages (for example, that some piece of text would be a heading or some other piece would be straight text). Also, there were ways to make text bold or italic, among a few other effects, but that's where their control ended. THE WEB The Web is a vast collection of documents on the Internet that are linked together via hyperlinks. The Internet consists of millions of computers worldwide that communicate electronically. A hyperlink is a predefined link between two documents. The hyperlinks allow a user to access documents on various Web servers without concern for where they are located. A Web server is a computer on the Internet that serves out Web pages on request. From a document on a Web server in California, the user is just one mouse click away from a document that is stored, perhaps, on a Web server in France. Hyperlinks are integral to the Web. Without them, there would be no Web. 1

Cascading Style Sheets Development of the Web The Web was invented around 1990 by Tim Berners-Lee with Robert Cailliau as a close ally. Both of them were then working at CERN, which is the European Laboratory for Particle Physics. Tim is a graduate of Oxford University and a long-time computer and software expert, and is now the director of the World Wide Web Consortium (W3C), an organization that coordinates the development of the Web. He also is a principal research scientist at Massachusetts Institute of Technology's Laboratory for Computer Science and Artificial Intelligence (MIT CSAIL). Robert is a 30-year veteran at CERN, where he still works. Robert organized the first Web conference in Geneva in 1993. Both Tim and Robert were awarded the ACM Software System Award in 1995 because of their work on the Web. Adding images Images proliferate on the Web. It wasn't until the Mosaic browser added support for images in 1993 that a critical mass of people realized the potential of the Web. You can add images to your documents with the IMG element IMG is short for image. When the image is ready, the page looks like Figure 1. Figure 1: The image has been loaded. 2

Chapter 2: CSS Chapter 2 CSS HTML is the most popular document format on the Web, and it is used in most of the examples in this book. As we explained in Chapter 1, The Web and HTML, HTML elements enable Web-page designers to mark up a document's structure. The HTML specification lists guidelines on how browsers should display these elements. For example, you can be reasonably sure that the contents of a STRONG element will be displayed as boldfaced. Also, you can pretty much trust that most browsers will display the content of an H1 element using a big font size at least bigger than the P element and bigger than the H2 element. But beyond trust and hope, you don't have any control over your text's appearance. RULES AND STYLE SHEETS You can create style sheets in two ways. You can either use a normal text editor and write the style sheets by hand or you can use a dedicated tool for example, a Web authoring tool. The dedicated tools enable you to create style sheets without learning the syntax of the CSS language. However, in many cases, the designer wants to tweak the style sheet by hand afterwards, so we recommend that you learn to write and edit CSS by hand. Let's get started! Here is a simple example: h1 { color: green } This code is a simple CSS rule that contains one rule. A rule is a statement about one stylistic aspect of one or more elements. A style sheet is a set of one or more rules that apply to an HTML document. This rule sets the color of all first-level headings (H1). 3

Cascading Style Sheets CSS SPECIFICATIONS Cascading Style Sheets is formally described in three W3C specifications: CSS1, CSS2, and CSS 2.1. (As discussed in the previous chapter, W3C is the organization that coordinates the technical development of the Web.) The first specification, CSS1, was issued in December 1996 and describes a simple style sheet language mostly for screen-based presentations. CSS1 has around 50 properties (for example, color and font-size). CSS2 was finalized in May 1998 and builds on CSS1. CSS2 includes all CSS1 properties and adds around 70 of its own, such as properties to describe aural Table 1: HTML extension Element elements and their CSS equivalent. <tt> 4 presentations and page breaks. CSS 2.1 is the most recent specification published by W3C. It adds some new features, but CSS 2.1 is mostly a scaled-down version of CSS2. CSS2 was an ambitious attempt to describe functionality, which Web authors had requested. However, not all the functionality is reliably supported by all browsers. CSS 2.1 is a specification that describes the parts that are supported by two or more browsers. Because CSS 2.1 is similar to CSS2, the specification was given a minor version number (that is, 2.1) rather than a major number (such as CSS3). CSS equivalent font-family: monospace <i> font-style: italic <b> font-weight: bold <u> text-decoration: underline

Index Index CERN, 2 Internet, 1 hyperlink, 1 rule, 3 style sheet, 3 W3C, 2 Web server, 1 World Wide Web Consortium, 2 5