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.

Slides:



Advertisements
Similar presentations
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Advertisements

Cascading Style Sheets
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Workshop: CSS-Part I Cascading Style Sheets add style to your HTML web pages.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Computing Concepts: CSS. Aims  To understand the uses of css  To understand the different types of css  To be able to create a css file  To be able.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
IT Introduction to Website Development Welcome!
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
CSS Style Rules Guang Tong, Zhan L;lo’p[ Css Style Rule Guang Tong Zhan Three ways to insert CSS 1 External style sheet 2 Internal style sheet 3 Inline.
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.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Today’s objectives  Complete web page  Using xhtml & CSS  Adding CSS to documents Embed url(File);  CSS.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
 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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
1 WDMD 170 – UW Stevens Point WDMD 170 Internet Languages eLesson: CSS Introduction to Style Sheets (NON-audio version) © Dr. David C. Gibbs
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit E Formatting with Cascading Style Sheets.
Cascading Style Sheets Tom Osman. Keep the content of a webpage separate from the formatting of the page. Structure (of content)  Headings  Sub headings.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Cascading Style SHEETS for formatting and layout control CSS HTML HTML HTML HTML HTML.
XHTML/CSS Week 3. This Week  Quiz to revise last week (XHTML and DW)  CSS - Part 2  Using HTML Tables.
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.
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.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
CSS Basic (cascading style sheets)
Cascading Style Sheets. What is CSS? Short for Cascading Style Sheets, a new feature being added to HTML that gives more control over how pages are displayed.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
October 21, Learn about Cascading Style Sheets LACUNY Web Management Roundtable October 21, 2005
Cascading Style Sheets
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
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.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
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.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
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.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
CSS Cascading Style Sheets *referenced from
OV Copyright © 2008 Element K Content LLC. All rights reserved. Working with Web Pages  An Introduction to Cascading Style Sheets  Format a Web.
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.
What is CSS? A set of style rules that tell the web browser how to present a web page or document. – In earlier versions of HTML, style characteristics,
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.
Style Sheets.
Cascading Style Sheets (CSS)
Intro to CSS CS 1150 Fall 2016.
Website Design 3
Intro to CSS CS 1150 Spring 2017.
Introduction to Cascading Style Sheets (CSS)
Web Design and Development
Creating your own Styles
Presentation transcript:

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 contained within { } and separated by ;  declarations consist of properties and values separated by a.

What is CSS?  CSS provides a means for web authors to separate the appearance of web pages from the content of web pages.  We'll be learning how to do it, why it's good to do it, and why it's not so good to keep using the old ways.

Why Use It  The traditional HTML approach was to "hardcode" all of the appearance information about a page.  So you want all your headings in courier, and at different point sizes to the sizes built into browsers? Then, for every heading, in every page, set the font size and face properties.

Why Use It?  You've got more than 100 pages? That is a lot of editing, a lot of re-editing if you decide to modify the appearance of your pages later. with all of that editing there is plenty of possibility for introducing errors.

How do you use CSS  Style sheets can be embedded or external External style sheets (just simple text files with a.css extension) keep the rules in a separate file. Embedded do the same thing but are part of the HTML code  Both ensure consistency in a website and making it very easy to make global changes/updates.

How do style sheets work?  The parts of a style sheet Every Cascading Style Sheet (css) is a series of instructions called statements. A statement does two things: 1.it identifies the elements in an HTML document that it affects 2.it tells the browser how to draw these elements

How do style sheets work?  By elements, I mean:  paragraphs,  links,  list items  Tables  and so on.  In technical HTML terms, an element is anything marked up inside HTML tags.

Example of a css style body { font-family: Verdana, "Minion Web", Helvetica, sans-serif; font-size: 1em; text-align: justify; } This is a single statement, perhaps one of many in a style sheet.

Example of a css style body { font-family: Verdana, "Minion Web", Helvetica, sans-serif; font-size: 1em; text-align: justify; } Selector  Opening Curly brace Property name Value  Closing Curly brace

Linking and embedding a style sheet  1st you need a web page. (Download from Web site)Download from Web site  2nd a css style sheet (Download from the Web)Download from the Web  Both can be accessed from the Web 10 site.

Linking a style sheet  Open the web page  Make an external link to the style sheet  This is what the code looks like:  where stylesheetname.css refers to the name of your file, and an appropriate path, if needed.

Embedding a Style sheet  Embedding a style sheet example (Download from the Web 10 site)Download from the Web 10 site

Tips  Have a template style sheet saved  Use the template for all your web pages Just tweak the page to suit the needs of the page  Download a template (from the web site)from the web site

Add this to your stylesheet.specialfont { font-family: font-family: "Times New Roman", Times, serif; color: green }

To use special font you must  The text you want special in your html code

Modify your style sheet body { font-family: Arial, Helvetica, sans-serif; background-color: #FF0000; }

Add a table to each of your pages  2 columns by 2 rows  Check your web pages now NameAge Bob16

Add the following to the web pages  Page 1 Part A  Page 1 Heading 2  Page 1 Heading 3  Page 1 Heading 6  Do the same for each of your pages..  Check your web page now…