Cascading Style Sheets Creating a Uniform Site. Style Sheets  Style sheets are used for conformity on a web page or web site.  Style sheets eliminate.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

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
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
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.
Part 2 Introduction to CSS. CSS Syntax – class selector 1 With the class selector you can define different styles for the same type of HTML element. You.
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 CSS.
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.
กระบวนวิชา 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.
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.
Prepared by ackoo Styli n g your page (font type, font size, colors, text decoration, alignment, set margin, table padding, etc.) References: W3Schools.
1 Creating Web Pages Part 3. 2 CASCADING STYLE SHEETS (CSS): What exactly are they? Set of rules that define how a web browser should display an HTML.
Controlling Page Style: Cascading Style Sheets (CSS) References: 1.Wang, P.S & Katila, S. (2004). A Introduction to Web Design and Programming. CA: Thomson.
CSS Pertemuan 12 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
4.01 Cascading Style Sheets
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,
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.
Basics of HTML.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
1 WDMD 170 – UW Stevens Point WDMD 170 Internet Languages eLesson: CSS Introduction to Style Sheets (NON-audio version) © Dr. David C. Gibbs
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Lesson 2 Adding more content to your web page. Thanks to Richard Hudnutt, Luella HS.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
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.
CSS Basic (cascading style sheets)
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
Cascading Style Sheets
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.
Introduction to CSS. What is CSS? CSS ("Cascading Style Sheets") determines how the elements in our XHTML documents are displayed and formatted. By using.
Cascading Style Sheets
Are You Smarter Than a 5 th Grader? 1,000,000 5th Grade HTML 5th Grade Syntax 4th Grade HTML 4th Grade Syntax 3rd Grade HTML 3rd Grade Syntax 2nd Grade.
Cascading Style Sheets I Embedded Style Sheets. Page Design ICSS 2Instructor: Sean Griffin What is a Style Sheet? A style sheet is a text file that contains.
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.
Cascading Style Sheets (CSS) EXPLORING COMPUTER SCIENCE – LESSON 3-5.
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
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.
CSS DHS Web Design. Location Between the & Start with – End with –
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…
CSS Cascading Style Sheets. Session Checklist ► Learn why style sheets are needed and their advantages and disadvantages ► Learn the format of a style.
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.
Cascading Style Sheets Part 1 1 IT 130 – Internet and the Web.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
CSS Nick Sims.
Cascading Style Sheets Part 1
Introduction to CSS.
Madam Hazwani binti Rahmat
CSS Cascading Style Sheets
Website Design 3
Introduction to CSS.
Cascading Style Sheets
Introduction to Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
Introduction to CSS.
Cascading Style Sheets Part 1
Presentation transcript:

Cascading Style Sheets Creating a Uniform Site

Style Sheets  Style sheets are used for conformity on a web page or web site.  Style sheets eliminate the need to type the same code attributes over and over.  There are three types: Inline Embedded Linked (external)

Inline  Not Recommended  These are just placed in a regular html file to define your attributes using the style attribute, as follows style=“n”  For example, to change the text for a single paragraph to a red, italicized font, you would change the tag to read  Notice the syntax between the quotes. Each element you want to change is separated with a semi-colon.

Embedded  Told you we’d use the head section later  Use in the head section  For example: p {color: navy; font-weight: bold; font size: 12pt;}  Notice that the element itself is no longer in brackets. The attributes are, but the bracket has changed. Find these brackets { } on your keyboard.  This would format your paragraphs for navy in color, bold and 12 point in size for your ENTIRE page.

Creating an embedded style sheet  Let’s say you have three different types of paragraphs you might want to display. You can do this with an embedded style sheet by classifying each paragraph. (You can also do this with a linked or external style sheet.)  Put the style code in a previously created website that has paragraphs and try it out.  You will also need to define paragraphs throughout your webpage as normal, thick and thicker. p.normal {font-weight: normal} p.thick {font-weight: bold; color: green;} p.thicker {font-weight: 900}  This is a paragraph

External or Linked SS  An external style sheet is used to control multiple pages in your website.  For example, if you want all your paragraphs to be navy, bold, 12 point, on every page of your website, you would use an external style sheet.  An external style sheet is a separate document.  You refer all your pages to that page using the link element.  The page will be a PLAIN TEXT FILE not an HTML file.

Creating an External Style Sheet  You will create the style sheet in notepad and save it as a plain text file. (mystyle.css)  Key the following in the document. body {background color=”silver} h3 {color=”white”; font size=”24pt;} p {color=”green”; font family=”arial”; border style=”double”; border color=”red”}  This creates the style sheet you will link to.  All H3s in HTML pages will be white and 24pt.  All paragraphs will be green arial with a double red border.

Now, create the HTML page CSS Sample Page This is going to be a headline. Paste a paragraph of text here. This is another headline This is another paragraph of text. This is the third headline. Paste a third paragraph here.  Save the file as styleexample.html and view in your browser to see if the styles were applied to the paragraph and the heading.

Basic CSS Syntax  Using HTML we could have done it like this:  With CSS the same result can be achieved like this: body {background- color: FF0000;}