Internet Web Publishing III. Intro to Cascading Style Sheets Patricia Roberts.

Slides:



Advertisements
Similar presentations
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Advertisements

Introduction to HTML & CSS
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style.
Cascading Style Sheets
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
It’s All About Style The Basics of Style Sheets Presented by Barry Diehl.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Review CSS.
Chapter 3 Working with Text and Cascading Style Sheets.
HCI 201 Week 6 Client Side Image Maps Introduction to CSS.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Working with Text and Cascading Style Sheets Adobe Dreamweaver Chapter 3.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Creating a Simple Page: HTML Overview
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,
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
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.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
Different ways to implement CSS. There are four different ways to use CSS in your web pages: – Inline CSS – Embedded CSS/Internal CSS – Linked CSS/External.
Chapter 3 Working with Text and Cascading Style Sheets.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Using Styles and Style Sheets for Design
Cascading Style Sheet (CSS)
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
CSS Basic (cascading style sheets)
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
© 2011 Delmar, Cengage Learning Chapter 8 Using Styles and Design Style Sheets for Design.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Text and Cascading Style Sheets.
Cascading Style Sheets CSS. Source W3Schools
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
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,
Cascading Style Sheets August 25-26, What is CSS? a means for web authors to separate the appearance of web pages from the content of web pages.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Cascading Style Sheets
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
Cascading Style Sheets Chris Vollmer IT 5610 Chatfield Senior High School.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
IT Accessibility Committee Cascading Style Sheets Presented by Michael B. Short Prepared by The NYS Forum IT Accessibility Committee
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
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.
Working with Cascading Style Sheets
Web Basics: HTML/CSS/JavaScript What are they?
Madam Hazwani binti Rahmat
Intro to CSS CS 1150 Fall 2016.
Website Design 3
Intro to CSS CS 1150 Spring 2017.
Cascading Style Sheets (Introduction)
Introduction to Cascading Style Sheets (CSS)
Cascading Style Sheets (Introduction)
Using Cascading Style Sheets (CSS)
Tutorial 3 Working with Cascading Style Sheets
Presentation transcript:

Internet Web Publishing III

Intro to Cascading Style Sheets Patricia Roberts

Cascading Style Sheets

WHY?

Cascading Style Sheets W H Y d o w e n e e d t h e m ? I t ’ s j u s t M O R E S T U F F !

Original HTML Philosophy

 to have basic text file that would be interpreted by the browser

Original HTML Philosophy  to have basic text file that would be interpreted by the browser  quickly downloaded

Original HTML Philosophy  to have basic text file that would be interpreted by the browser  quickly downloaded But:

Original HTML Philosophy  to have basic text file that would be interpreted by the browser  quickly downloaded But:  final page format depended upon browser used

Original HTML Philosophy  to have basic text file that would be interpreted by the browser  quickly downloaded But:  final page format depended upon browser used  not much control over placement of some objects

Original HTML Page Layout Could be Controlled by

 Using HTML tag extensions

Original HTML Page Layout Could be Controlled by  Using HTML tag extensions  Converting text to images

Original HTML Page Layout Could be Controlled by  Using HTML tag extensions  Converting text to images  Controlling page layout with tables

But There Were Drawbacks

 Using HTML tag extensions

But There Were Drawbacks  Using HTML tag extensions –not all browsers supported the extensions

But There Were Drawbacks  Using HTML tag extensions –not all browsers supported the extensions  Converting text to images

But There Were Drawbacks  Using HTML tag extensions –not all browsers supported extensions  Converting text to images –slowed page download speed

But There Were Drawbacks  Using HTML tag extensions –not all browsers supported extensions  Converting text to images –slowed page download speed  Controlling page layout with tables

But There Were Drawbacks  Using HTML tag extensions –not all browsers supported extensions  Converting text to images –slowed page download speed  Controlling page layout with tables –Makes code more complex and difficult to interpret by coder –May slow download speeds

Other Original HTML drawbacks  Content not separated from design within the document (code tags and content intertwined)

Other Original HTML drawbacks  Content not separated from design within the document (code tags and content intertwined)  In order to apply a style, must apply tag to each occurrence individually.

Other Original HTML drawbacks  Content not separated from design within the document (code tags and content intertwined)  In order to apply a style, must apply tag to each occurrence individually.  Not possible to define elements of style and follow with content

Solution?

Style: rule which defines the appearance of an element in the document.

With Styles Instead of relying on browsers to interpret the document, the appearance of a tag is explicitly defined. When browser receives text file from the server, also receives the rules for displaying the document. The collection of styles for a web page is known as a STYLE SHEET

Styles  Limitations of HTML led to development of style sheets  Style sheets use a common language and follow common rules; language is known as Cascading Style Sheets (CSS)*  CSS developed by W3C  Developed to SUPPLEMENT HTML *CCS sometimes used, Proprietary CSS first developed by Netscape

CSS  First CSS standard, CSS1, released in 1996  CSS2 was released in 1998  Formatting web pages quite different in CSS from HTML  CSS provides several tools not available in HTML

CSS  Browser support for CSS is uneven  I.E. best for CSS1  Netscape tried to have own version of CSS; N 4.7 not fully CSS1 compliant  No browser fully compliant with CSS2  Test in as many browsers as possible

CSS References  The World Wide Web Consortium  The Web Standards Project  CSS bugs and workarounds  Little Shopr of CSS Horrors

Solution: Styles Four Types  Inline Styles  Embedded (Global) Styles  External (Style Sheets)

Style Uses Inline Style Section Embedded Style Document External (Linked) Style SheetWeb site

Solution: Styles Inline Styles Style affects an isolated instance of an HTML tag Only the tag defined is affected, other tags in the document are not

Solution: Styles Embedded (Global) Styles Applies to a single document, tags included IN the document Any tag can be defined and the style affects the entire HTML document In other words, the new style definition replaces the old definition for that tag throughout the document

Solution: Styles Linked (or external) style sheets Tags are defined within a text file which is saved as its own file with a.CSS extension

CSS Styles  If need to format a single section in your webpage, then you might use the inline style  If need to format all instances of an element in a Web page, then use the embedded or global style  If need to format elements for an entire site, then use a linked style sheet.

Uses of Styles ToUse Define a tag within a section of a document Inline Style Define a tag throughout a document Embedded or Global Style Define a tag throughout an entire Web site Linked Style Sheet

Using Inline Styles To UseDo this Inline StyleAdd the “style” property to the HTML tag How “style declarations”= attribute1:value1; attribute2:value2

Using Inline Styles To UseDo this Inline StyleAdd the “style” property to the HTML tag Examples Another example

Using Embedded Styles To UseDo this Linked Style SheetCreate an embedded style How There are several style sheet languages, but the default is “text/css” for CSS

Using Embedded Styles Important Terms in Embedded Styles Selector = Element in HTML document (such as Header, Paragraph) Declaration= the collection attibutes and values applied to the selector(s)

Using Embedded Styles To UseDo this Linked Style SheetCreate an embedded style use Selectors Selectors= elements in y Exampe There are several style sheet languages, but the default is “text/css” for CSS

Using Styles To UseDo this Inline StyleAdd the “style” property to the HTML tag Define a tag throughout a document Embedded or Global Style Define a tag throughout an entire Web site Linked Style Sheet

Using Styles To UseDo this Inline StyleAdd the “style” property to the HTML tag Define a tag throughout a document Embedded or Global Style Define a tag throughout an entire Web site Linked Style Sheet

Styles  Inheritance  Precedence

Back to Classroom Learning Page