External Style rules for HTML Standardize organization web sites Page Layout using positioning Absolute & Relative Positioning of Elements Cascading Style.

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
External style rules for HTML Organization web sites can share a style sheet Layout of pages using positioning Absolute & Relative Positioning Cascading.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
4.01 Cascading Style Sheets
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Improve the Look of Your Web Page with CSS Caroline Hallam September 16, 2014.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Cascading Style Sheet Basics Pepper. Looking at the HTML See the surrounding tags See head, body, paragraph, header See the ending tags See the list.
HTML - Quiz #2 Attendance CODE:
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.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
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.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
CSS Netcentric. What is CSS O CSS stands for Cascading Style Sheets O Styles define how to display HTML elements O Styles were added to HTML 4.0 to solve.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 14, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
Cascading Style Sheets Tom Osman. Keep the content of a webpage separate from the formatting of the page. Structure (of content)  Headings  Sub headings.
FTS: The Perils and Promise of Computing Cascading Style Sheets (CSS) Gustavus Adolphus College Fall 2012.
XHTML/CSS Week 3. This Week  Quiz to revise last week (XHTML and DW)  CSS - Part 2  Using HTML Tables.
CO1552 – Web Application Development Cascading Style Sheets.
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.
Cascading Style Sheet Bayu Priyambadha, S.Kom. Definition Cascading Style Sheets (CSS) form the presentation layer of the user interface. –Structure (HTML)
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
IS 360 Declaring CSS Styles. Slide 2 Introduction Learn about the three ways to declare a style Inline / embedded / external Learn about the effect of.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Ch 10 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
Using the CSS. What is CSS? CSS is a language that’s used to define the formatting applied to a Website, including colors, background images, typefaces.
Advanced Web Development Instructor: Thomas Bombach.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
Cascading Style Sheets Level 2. Course Objectives, Session 1 Level 1 Quick Review Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your.
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
CSS Cascading Style Sheets. Cascading Style Sheet (CSS) A cascading style sheet (CSS) is a set of rules that define styles to be applied to entire Web.
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
Main page banner area Navigation bar area Main area for information content Look at a simple page from the Waitrose supermarket site. It has three main.
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
OV Copyright © 2008 Element K Content LLC. All rights reserved. Working with Web Pages  An Introduction to Cascading Style Sheets  Format a Web.
CS134 Web Design & Development Web Page Layout Mehmud Abliz.
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.
Web Page Layout. table vs. div table –Pros: supported by all browsers –Cons: bind style to content; hard to maintain div –Pros: easy to maintain –Cons:
Cascading Styles Sheets Positioning HTML elements.
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.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
The Box Model in CSS Web Design – Sec 4-8
4.01 Cascading Style Sheets
Google fonts CSS box model
Cascading Style Sheets (Layout)
DynamicHTML Cascading Style Sheet Internet Technology.
DynamicHTML Cascading Style Sheet Internet Technology.
Web Design & Development
4.01 Cascading Style Sheets
Presentation transcript:

External Style rules for HTML Standardize organization web sites Page Layout using positioning Absolute & Relative Positioning of Elements Cascading Style Sheets by sharing style sheets - instead of tables Box Formatting Model - for HTML Elements Powerful when combined with Javascript

XML CSS DTD Link > CSS-XML-Examples > CSS-ExamplesCSS-XML-Examples "myCS01.css"; body { } background-color: #bbbbbb ; font-family: verdana ; reference to style sheet myCS01.css style rule for body element Cross-Reference Style Sheets style sheet

Style sheet Web site 1Web site 3 Standardize "Look" of multiple web sites called 'Cascading' because of how priority rules resolve conflicts when multiple rules apply to an element.

body { } background-color: #bbbbbb; font-family: verdana, arial, helvetica, sans-serif ; myCS01.css h1 { margin: 30px; padding: 50px; border: 3px dashed #333; } uses Box Format Model For Html elements fonts in order of preference

margin border padding HTML content Atmospheric space around HTML content has width & color - solid, dashed Buffer space beyond border Box Formatting Model EVERY HTML element w3.org/TR/REC-CSS1#formatting-model space-border-space

margin border padding HTML content cell padding border cell spacing element cell contents

myCS01.css Style rule for paragraph p { } Top-Right-Bottom-Left T RI B LE (clockwise) border: 3px dashed #333; font-size: 11px; line-height: 20px; margin: 20px 20px 20px 20px; padding: 0px; Box Formatting Model

Simple style rules - Grouped elements Types of Style Rules h1 { color: blue } declaration h1, h2, h3 { color: blue } Grouped declarations h1 { color: blue ; font-size: 12pt ; } NO quotes!

ID selector # bluish { } --- CSS Rule HTML reference Versus rules for HTML Elements h1 { color: blue } h1, h2, h3 { color: blue } Named rules These can be applied to any HTML element – tables, forms, etc !c

Class selector ID selector h1. bluish { color: blue }. bluish { color: blue } --- # bluish { } --- CSS RuleHTML reference CSS Rule HTML reference

#Immobile { } Absolute Positioning parent absolute container top width left position: absolute; top: 150px; left: 50px; width: 200px; line-height: 17px; background-color: #cba; font: 11px/20px verdana, arial padding: 10px; border: 1px dashed #999; Anchors element on page Html Element

#Content-right { } Relative Positioning /* Top-Right-Bottom-Left margin box T RI B LE */ margin: 50px 30px 50px 300px ; background-color: #eee; line-height: 17px ; border: 1px dashed #999 ; padding: 10px ; Html content Parent Html Top Right Bottom Left Body test00.html & css00.css Experiment with these. Style rule Embedded in Parent Html Element CSS Rule

' position absolute position absolute test00.html myCS00.css Absolute & Relative Layout Control Relative to body margin

body { margin: 10px; padding:0px; font-family:verdana, arial, helvetica, sans-serif; border:10px solid #111; background-color:#bbb; } p { font:11px/20px verdana, arial, helvetica, sans-serif; margin:20px 20px 20px 20px; padding:0px; border:1px dashed #999; background-color:#eee; } /* same as: p { font-family: verdana, arial, helvetica, sans-serif; font-size: 11px; line-height: 20px; margin:20px 20px 20px 20px; padding:0px; } */ #Content-right { margin: 50px 30px 50px 300px; padding:10px; border:1px dashed #999; background-color:#eee; line-height:17px; } /* Top-Right-Bottom-Left constraints on margin box T-RI-B-LE */ #Content-left { margin: 20px 350px 70px 20px; padding:10px; border:1px dashed #999; background-color:#dce; line-height:17px; } #Immobile { position:absolute; top:150px; left:50px; bottom 220px; font:11px/20px verdana, arial, helvetica, sans-serif; padding:10px; width:200px; background-color:#cba; border:1px dashed #999; line-height:17px; } #Menu { position:absolute; top:650px; left:50px; width:172px; padding:10px; font:11px/20px verdana, arial, helvetica, sans-serif; background-color:#eba; border:1px dashed #999; line-height:17px; }

@import "myCS00.css"; Hello Hello. I hope you are having a nice day. THE SUN RISING. by John Donne BUSY old fool, unruly Sun, Why dost thou thus, Through windows, and through curtains, call on us ? Must to thy motions lovers' seasons run ? Saucy pedantic wretch, go chide Late school-boys and sour prentices,. Thy beams so reverend, and strong Why shouldst thou think ? I could eclipse and cloud them with a wink, But that I would not lose her sight so long. If her eyes have not blinded thine, Look, and to-morrow late tell me, See what the Immobile style does. #Immobile { position:absolute; top:150px; left:0px; padding:10px; width:200px; background-color:#cba; border:1px dashed #999; line-height:17px; } hello hello hello List of Links nowhere to go fake link another deadend Choose an HTML Reference Site Table of HTML Commands and Attributes HTML reference w3schools HTML reference w3schools DOM reference Style Properties

XML CSS menu > CSS-XML-TopicsCSS-XML-Topics especially Box Formatting model References to CSS Links > CSS-Examples/CSS-Examples/ Web Standards Organization examples adapted from here