Ch 8 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Advertisements

Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
CSS(Cascading Style Sheets )
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Week 7 Web Typography. 2 Understanding Type Design Principles.
CSS Demo. Questions How many of you –knows how to code html? –have used dreamweaver or some other graphical html editor? –have used css styles?
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Formatting Text (Plus More Selectors) Learning Web Design: Chapter 12.
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Week 4.  Three ways to apply CSS: Inline CSS Internal style sheets ( header style information) External style sheets.
Cascading Style Sheet (CSS)
1Computer Sciences Department. And use
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
Doman’s Sections Information in this presentation includes text and images from
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
Part 1: CSS - Why? - How it works - Writing rules - Examples.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
CSS Font CSS font properties define the font family, boldness, size, and the style of a text. CSS Font Families Generic family Font familyDescription Serif.
Files you will need ... Black Goose Bistro Summer Menu
More CSS.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
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). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
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,
Developing Web Applications with HTML and CSS “Selectors and Properties”
CSS: Cascading Style Sheets Part II. Style Syntax.
CSS Cascading Style Sheets *referenced from
Company LOGO In the Name of Allah,The Most Gracious, The Most Merciful King Khalid University College of Computer and Information System Web pages Development.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Links All CSS properties can be applied on links (i.e. change colors, fonts, underline, etc). The new thing is that CSS allows you to define these properties.
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
1 Cascading Style Sheets
Internet & World Wide Web How to Program, 5/e 1. 2.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets
Cascading Style Sheet.
More CSS.
CS3220 Web and Internet Programming CSS Basics
Cascading Style Sheets Color and Font Properties
Cascading Style Sheets
Cascading Style Sheets
Chapter 7 Page Layout Basics Key Concepts
IS333: MULTI-TIER APPLICATION DEVELOPMENT
CSS Style Sheets: Intro
More CSS.
Cascading Style Sheets Color and Font Properties
Cascading Style Sheets
CS3220 Web and Internet Programming CSS Basics
Cascading Style Sheets
Presentation transcript:

Ch 8 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach

 Microsoft Word example of use of Styles – in Action  First CSS p { color: teal; }

selector { property: value; }

What is a RULE? RULE SelectorDeclaration p{ color : red; } PropertyValue

selector { property1: value1; property2: value2 }

 Embedded within a Web page – part of the selector_list……  Styling the  Text colour  Background colour  Width  Headings  Inheritance  The default action  Specificity  Customisation of clauses

 It is essential to make your code readable and adding comments help explain what your intentions were when you wrote the particular CSS.

Ch 9 HTML and CSS Web Standards Solutions A Web Standardistas’ Approach

 Inheritance is the child of and is the parent of in this example. As you build more complicated examples the use of h1-h4, p, em, strong, blockquote, cite, abbr, ul, ol, li, a and img will also be children of body

 Inheritance  As the rules are children of the same parent they automatically inherit their properties for their style.  Specificity  Why does an h1 not be the same size as the body font size it inherits ?  Answer: there must be rules being applied as well as the ones you are creating.  Where are they located ?  Answer: default stylesheets

 Specificity  What/Where are they ?  They can be located in 3 different places:  Author Styles  Created by the author of the Web Page  User Styles  The User may have their preferred Stylesheet that they want applied – visual impairment  User Agent Styles  Browser has its own default styles  Is there an order to how the Rules are applied  Yes, we will see the process in Chapter 10

 There are core fonts that all browsers set to adhere to:  It is possible to list alternative font-family values font-family: Baskerville, Georgia, "Times New Roman", serif; So if Baskervile is not available it is substituted by Georgia and if it not available it is substituted by Times New Roman, etc.  Serif fonts are those decorated with decorative serifs or accents at the end of various letters – Times New Roman.  San-Serif fonts do not have the decoration - Arial.  Monospace fonts use the same spacing between characters regardless of the pairing of characters Couries New.

 Sizing text matters  There are reserved keywords: Source:

 Sizing text:  Pixels  Fixed and therefore not very accessible  Ems  The typical browser default font-size is 16px body { font-size : 62.5%; } 62.5% because it transforms 16 pixels to 10 pixels, which is easier to work with. p { font-size : 1.4em; }

 If you had to write each Rule out completely it will mean that the file size will get larger and therefore take longer to download.

 It is possible to transform text to:  UPPERCASE  lowercase  Capitalize

 Character Spacing:  Line Height:

 Paragraphs  text-align property  left (default)  right  center  justify  text-indent property

 CSS allows you to style how Web links appear to the user.  There are four ‘classes’ available to do this:  link  Unvisited link in a page  visited  Viewed recently  hover  Move mouse over  active  Clicking on the link  focus  Using the keyboard the user is focusing on this link

 Changing  color  decoration  line height

 Order is important in defining the CSS rules  LoVe HAte your Links  a:link (L)  a:visited (V)  a:hover (H)  a:active (A)