1 Dynamic HTML and Cascading Style Sheets (CSS) Dynamic HTML and Cascading Style Sheets (CSS) Electronic Commerce Prof. Sheizaf Rafaeli.

Slides:



Advertisements
Similar presentations
1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
Advertisements

HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Cascading Style Sheets
Today CSS HTML A project.
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
It’s All About Style The Basics of Style Sheets Presented by Barry Diehl.
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.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
1 Web Developer Foundations: Using XHTML Chapter 9 Cascading Style Sheet Concepts.
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.
Cascading style sheets (CSS)
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Multimedia & The World Wide Web winny HCI 201 Multimedia and the www.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Cascading Style Sheet (CSS)
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
Tutorial 6 By Sam INE 1020 Introduction to Internet Engineering 1 DHTML & CSS Tutorial 6.
I NTRO TO CSS IAT100 Spring I NTRO TO CSS Covered in this lesson: Overview What is CSS? Why to use CSS? CSS for Skinning your Website Structure.
WRT235: Writing in Electronic Environments CSS Classes, IDs, divs.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
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.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
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.
WRT235: Writing in Electronic Environments Basic CSS.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
DHTML. What is it? Dynamic HTML. Not a standard unlike HTML or Java It is a term applied by both Netscape and Microsoft to a collection of technologies.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Cascading Style Sheets CSS. Source W3Schools
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
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,
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
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.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
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…
CM143- WEB CM143-WEB Page Layout live sites HTML Images User Considerations Planning Navigation CSS Architecture File Management Cascading Style Sheets.
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.
Internet & World Wide Web How to Program, 5/e 1. 2.
Introduction to CSS: Selectors
Working with Cascading Style Sheets
Cascading Style Sheets
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
>> CSS Rules Selection
CX Introduction to Web Programming
Dynamic HTML.
Cascading Style Sheets - Building a stylesheet
Software Engineering for Internet Applications
Introduction to Cascading Style Sheets (CSS)
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
Cascading Style Sheets - Building a stylesheet
Cascading Style Sheets III B. Com (Paper - VI) & III B
Web Programming and Design
Presentation transcript:

1 Dynamic HTML and Cascading Style Sheets (CSS) Dynamic HTML and Cascading Style Sheets (CSS) Electronic Commerce Prof. Sheizaf Rafaeli

2 Electronic Commerce; Prof. Sheizaf Rafaeli The BIG issues n Separating structure from content and behavior n Download time n Upgrade time n Compatibility (across, forward and backward) n Keeping it simple, learning and debugging

3 Electronic Commerce; Prof. Sheizaf Rafaeli Dynamic HTML “ “ Call us crazy, but we thought that the next big thing in HTML wasn't going to be a new tag. “ n Netscape’s (DevEdge) guide to DHTML: – mmunicator/dynhtml/index.htm n Microsoft’s Dynamic HTML Object Model: – online/workshop/author/dom/domoverview.asp – ject.asp

4 Electronic Commerce; Prof. Sheizaf Rafaeli DHTML: Dynamic HTML n DHTML - still more a promise than a reality n But certainly the shape of things to come n n a group of technologies that make Web pages more like miniature software applications. n n If ever there was a Bleeding Edge

5 Electronic Commerce; Prof. Sheizaf Rafaeli Dynamic HTML n Cross-Browser techniques are the holy grail n WebMonkey’s tutorial, Nadav Savio, reconciles the two at: – n See C-Net builder’s tutorial at: – n See (book and website) –And especially the 10K demos!

6 Electronic Commerce; Prof. Sheizaf Rafaeli DHTML components n DOM: the (DYNAMIC) Document Object Model n CSS: Cascading Style Sheets n Scripting languages: (like Javascript, Active-X, asp). n And, depending on the browser, positioning, downloading fonts, streaming content, “behaviors”, image transition, animated backgrounds, etc.

7 Electronic Commerce; Prof. Sheizaf Rafaeli DOM: The Document object Model n n defines all items on a Web page as objects that can be manipulated. n n Otherwise, those elements are set, defined solely by the browser. For example, the DOM makes it possible to identify individual letters on a page as separate objects, and then to assign specific qualities, such as color or size, to each letter. In a sense, every letter becomes a tiny Web page.

8 Electronic Commerce; Prof. Sheizaf Rafaeli Cascading Style Sheets (CSS) n Cascading Style Sheets are a simple way to control style without compromising structure. They separate the style (visual design elements) from the structure of documents. n n CSS is a form of HTML mark-up that provides web designers with greater control over typography and spacing between elements on a page.

9 Electronic Commerce; Prof. Sheizaf Rafaeli Cascading Style Sheets (CSS) n Changing the style can affect an entire document. n Style sheets can be shared by multiple documents. n So changing a style can affect an entire website n n WHAT ABOUT BROWSER COMPATIBILITY? CSS support is provided in Internet Explorer 4+ and Netscape Navigator 4+. However, some annoying browser inconsistencies continue

10 Electronic Commerce; Prof. Sheizaf Rafaeli Cascading Style Sheets (CSS) n n CSS overrides the browser's default settings n n WHAT DOES CSS LOOK LIKE? – –The basic template for CSS code looks like this: – –Tag: {Property: value; Property2: value2} – –Tag - The element that will be affected Property - What part of the selector will be affected Value - How it will be affected

11 Electronic Commerce; Prof. Sheizaf Rafaeli Cascading Style Sheets (CSS) n n CSS overrides the browser's default settings n n A CSS declaration has two parts: – –a property (”font-size” or “color”) and a value ( “10pt” or "red"). n n The basic syntax of a rule – –selector {property 1: value 1; property 2: value: 2} n n Examples: – –P {font-size: 10pt; color: red} – –H1 {FONT-SIZE: 9pt; FONT-WEIGHT: bold}

12 Electronic Commerce; Prof. Sheizaf Rafaeli CSS (3) n Linked Global Local style sheet definitions. –definitions replace the definitions for typeface, font size, color and margins, etc. –Local (inline) definitions replace the definitions for typeface, font size, color and margins, etc. – declarations are defined within pairs, usually in header. –Global (embedded) declarations are defined within pairs, usually in header. –stylesheets use separate files, and link to them using : –Linked (external) stylesheets use separate.css files, and link to them using : » »

13 Electronic Commerce; Prof. Sheizaf Rafaeli Types of CSS n Inline: n Inline: this will be bold n n Embedded :

14 Electronic Commerce; Prof. Sheizaf Rafaeli Types of CSS n n External: n n The SHEET.CSS file would then contain all the style-sheet code which would be applied to any page that calls it using the code above.

15 Electronic Commerce; Prof. Sheizaf Rafaeli Short, sweet example n n REMOVE UNDERLINES - A Complete Style Sheet n n Do you want to remove underlines from links on your site? Below is a short and sweet style-sheet that will do just that, just copy and paste it between the tags on your site: – –

16 Electronic Commerce; Prof. Sheizaf Rafaeli Full CSS example <!-- h4 {font: 17pt Arial,Helvetica"; font-weight: bold; color: maroon} h2 {font: 15pt "Courier"; font-weight: bold; color: blue} p {font: 12pt "Arial,Helvetica"; color: black} -->... This is an example of the middle level (“global” or “embedded” form of CSS. Note how style code is hidden (as in Javascript) Note that fonts can be defined in points, pixels, inches or centimeters.

17 Electronic Commerce; Prof. Sheizaf Rafaeli CSS (4) n Cascading or Inheritance: When conflicting, the more specific stylesheet overrides. n Units of Measure: see: – n Attributes: layers of Class, ID, Span and DIV. n Properties: see: – ies.html

18 Electronic Commerce; Prof. Sheizaf Rafaeli CSS (5) n W3C Cascading Style Sheets specs, at: – n Microsoft’s User’s Guide, at: n Examples, at: – –Microsoft’s CSS gallery, at:

19 Electronic Commerce; Prof. Sheizaf Rafaeli CSS (6) tml tml ylesheets.html ylesheets.html ml ml