Cascading Style Sheets - Designing for the Web

Similar documents
HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Cascading Style Sheets: Designing For The Web By Bert Bos, Hakon Wium Lie READ ONLINE

Web Information System Design. Tatsuya Hagino

Lesson 5 Introduction to Cascading Style Sheets

MARKUP LANGUAGES. A brief history of Markup languages

= a hypertext system which is accessible via internet

The Internet. Tim Capes. November 7, 2011

Some businesses have changed in a major way because of new technology

Multimedia for the Web: Creating Digital Excitement. Multimedia Element Text

Network Working Group Request for Comments: 2318 Category: Informational W3C March 1998

CSS Handout. CS 4173 Summer about 70 more properties includes all of CSS1 includes properties for non-screen presentation

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Introduction to web development and HTML MGMT 230 LAB

MRK260. Week Two. Graphic and Web Design

Cascading Style Sheets: Designing For The Web By Bert Bos, Hakon Wium Lie

Web Design and Development ACS-1809

Grade 9 :The Internet and HTML Code Unit 1

Style Sheet Languages for Hypertext

Year 8 Computing Science End of Term 3 Revision Guide

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

Cascading Style Sheets (CSS) Part 1 of 3: Introduction and overview

Web Design and Development ACS-1809

Which is why we ll now be learning how to write in CSS (or cascading sheet style)

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

Web Technology. Assignment 3. Notes: This assignment is individual assignment, every student should complete it by himself.

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

José Luis Fuertes / Loïc Martínez Normand Computer Science School. Technical University of Madrid.

Birth of the World Wide Web

CSS: The Basics CISC 282 September 20, 2014

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

The Nature of the Web

What is a web site? Web editors Introduction to HTML (Hyper Text Markup Language)

Cascading Style Sheets (Part 3): Images and Text. Mike Hamilton V.P. Product Evangelism MadCap Software

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

HTML: Introduction CISC 282. September 11, What is HTML?

Chapter 7 Typography, Style Sheets, and Color. Mrs. Johnson

CS/COE 1520

Background of HTML and the Internet

HTML, CSS. Kristóf Kovács, Róbert Pálovics, Ferenc Wettl Kristóf Kovács, Róbert Pálovics, Ferenc Wettl HTML, CSS / 28

Developing a Basic Web Page

CSC9B1: Essential Skills WWW 1

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Tutorial 2 - HTML basics

Agenda. INTRODUCTION TO WEB DEVELOPMENT AND HTML <Lecture 1> 1/20/2013. What is a Web Developer? Rommel Anthony Palomino Spring

Html basics Course Outline

COPYRIGHTED MATERIAL. The Basics of HTML. What Is the World Wide Web?

In the early days of the Web, designers just had the original 91 HTML tags to work with.

The World Wide Web is a technology beast. If you have read this book s

Web Engineering (CC 552)

A network is a group of two or more computers that are connected to share resources and information.

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

HTML/CSS Essentials. Day Three Ed Crowley

Web Design E M I R R A H A M A N WEB DESIGN SIDES 2017 EMIR RAHAMAN 1

HTML CS 4640 Programming Languages for Web Applications

The Internet and the Web. recall: the Internet is a vast, international network of computers

Reading 2.2 Cascading Style Sheets

Objectives. Introduction to HTML. Objectives. Objectives

Web Publishing Basics I

Unit 4 The Web. Computer Concepts Unit Contents. 4 Web Overview. 4 Section A: Web Basics. 4 Evolution

A Fractured Fairy Tale History of the Internet

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

Hyper Text Markup Language HTML: A Tutorial

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 3 Test Bank

CSS means Cascading Style Sheets. It is used to style HTML documents.

CMPT 165 Unit 2 Markup Part 2

Introduction to Web Technologies

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

CS7026: Authoring for Digital Media. Introduction Markup Languages

Activity 4.1: Creating a new Cascading Style Sheet

A Balanced Introduction to Computer Science, 3/E David Reed, Creighton University 2011 Pearson Prentice Hall ISBN

E , Fall 2007 More with stylesheets

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

HTML Made Easy: The XTND HTML Translator

Collection of (1) Meta-network. Uses a standard set of protocols Also uses standards for structuring the information transferred

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Three Ways to Use CSS:

c122jan2714.notebook January 27, 2014

Learn Html And Css With W3schools

for Beginners COPYRIGHT NATIONAL SEMINARS TRAINING. ALL RIGHTS RESERVED.

IT-1150: INTRODUCTION TO WEB PROGRAMMING

Hypertext Markup Language, or HTML, is a markup

Creating Accessible Web Sites with EPiServer

By completing this practical, the students will learn how to accomplish the following tasks:

What Are CSS and DHTML?

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

Revision for Grade 7 ASP in Unit :1&2 Design & Technology Subject

Web Development. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 10/11. Sérgio Nunes

Introduction to CSS. Fijihosting.com Introduction to CSS page 1. What are style sheets? Lovely! How do I use them?

QDITA ONLINE COURSE VISUAL EXPERIENCE FORMATION

This document provides a concise, introductory lesson in HTML formatting.

The Internet and The World Wide Web. Peter Henderson

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Brief Intro to HTML. CITS3403 Agile Web Development. 2018, Semester 1

Chapter 12: FORMATTING TEXT

Joomla Website User Guide

How to use CSS text styles

Using CSS in Web Site Design

Transcription:

Cascading Style Sheets - Designing for the Web Page 1 of 11 Cascading Style Sheets DESIGNING FOR THE WEB Third Edition SAMPLE DOCUMENT

Page 2 of 11

Page 3 of 11 Cascading Style Sheets DESIGNING FOR THE WEB Third Edition

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

Page 5 of 11 Copyright 2005 Håkon Wium Lie and Bert Bos

Page 6 of 11 Table of Contents Table of Contents Preface The Web and HTML The Web Development of the Web Adding images CSS Rules and Style Sheets Index

Page 7 of 11 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 have been included. That book was produced using the methods described in the document, and it was published by Addison- Wesley in 2005. 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

Page 8 of 11 The Web and HTML x CSS Specifications lists the different CSS Cascading Style Sheets (CSS) represent a major breakthrough in how Web-page designers work by specifications. 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. 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 The image has been loaded. 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 this figure.

Page 9 of 11

Page 10 of 11 CSS e most popular document format on the Web, As we explained in The Web and HTML, HTML elements enable Web-page designers to mark up a is used in most of the examples in this book. 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. 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 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). 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). extension elements and their CSS equivalent. Element <tt> <i> <b> <u> CSS equivalent font-family: monospace font-style: italic font-weight: bold text-decoration: underline

Page 11 of 11 Index CERN Internet hyperlink rule style sheet W3C Web server World Wide Web Consortium