Linking to an External Style Sheet Web Design Section 4-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.

Slides:



Advertisements
Similar presentations
Tables Feb. 14, Tables Great way to organize and display information Laid out in columns and rows Think of an excel spreadsheet Defined with tag.
Advertisements

HTML Basics Customizing your site using the basics of HTML.
Layouts Using Tables Web Design – Section 4-5 Part or all of this lesson was adapted from the University of Washingtons Web Design & Development I Course.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
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:
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,
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Technologies for web publishing Ing. Václav Freylich Lecture 5.
Different ways to implement CSS. There are four different ways to use CSS in your web pages: – Inline CSS – Embedded CSS/Internal CSS – Linked CSS/External.
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.
HTML - Quiz #2 Attendance CODE:
Robert Vitolo CS430.  CSS (Cascading Style Sheets)  Purpose: To provide a consistent look and feel for a set of web pages To make it easy to update.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
The Characteristics of CSS
Styles with Cascading Style Sheets (CSS) Web Design – Section 4-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design.
INTERNAL CSS Casey Ames Different types of CSS There are three different types of CSS: ◦ External CSS ◦ Internal CSS ◦ Inline CSS In this presentation.
Intro to Dreamweaver Web Design Section 7-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
The format is text files, with.htm or.html extension. Hard returns, tabs, and extra spaces are ignored. DO NOT use spaces in file names. File names ARE.
Cascading Style SHEETS for formatting and layout control CSS HTML HTML HTML HTML HTML.
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.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
Working With Text Web Design Section 5-9 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
The Web Wizard’s Guide To DHTML and CSS Chapter 1 A Review of CSS1.
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.
Cascading Style Sheets
Stylizing a Navigation Menu with CSS Web Design – Section 4-13 Part or all of this lesson was adapted from the University of Washington’s “Web Design &
Lesson 15: Cascading Style Sheets. Objectives Identify ways to apply Web page formatting with Cascading Style Sheets (CSS1 and CSS2) using various methods.
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. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
Adding Images to Your Web Page Web Design Section 5-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Cascading Style Sheets
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Understanding ID and Class in CSS Web Design – Sec 4-9 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
External Style Sheets Exploring Computer Science – Lesson 3-6.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
HTML5 and CSS3 Illustrated Unit C: Getting Started with CSS.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Creating Your Own Navigation Menu Web Design Section 6-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
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 SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
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 Nick Sims.
Getting Started with CSS
HTML5 and CSS3 Illustrated Unit D: Formatting Text with CSS
Using JavaScript to Show an Alert
>> Introduction to CSS
Intro to Dreamweaver Web Design Section 8-1
Styles with Cascading Style Sheets (CSS)
Styles with Cascading Style Sheets (CSS)
Dreamweaver – Setting up a Site and Page Layouts
CASCADING STYLE SHEET CSS.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Introduction to Web Authoring
Working with Cascading Style Sheets (CSS)
Working with Cascading Style Sheets (CSS)
Web Design and Development
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

Linking to an External Style Sheet Web Design Section 4-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials

Objectives The Student will: Understand the difference between internal and external style sheets Understand the difference between internal and external style sheets Create an external style sheet, and link to it from within your web pages Create an external style sheet, and link to it from within your web pages Know how to control aspects of the external style so they apply to just 1 file. Know how to control aspects of the external style so they apply to just 1 file.

External Style Sheets Adding a element in a html file is a great way to format a webpage What if you would like that same style to apply across multiple web pages? This would provide consistency in the web pages This would provide consistency in the web pages Allow a single place to change the style and have that change affect all web pages Allow a single place to change the style and have that change affect all web pages External Style sheets allow you do that.

External Style Sheets You can take all your CSS style code and place it in a separate file (styles/ mystyle.css) The sheet is then linked into any html files that you want to share that style: The sheet can be included in multiple html files.

Restricting Styles There are some styles that you may have applied to one page, but don't want it to apply to all pages. This is especially true on the home page, since home pages tend to be different than other pages in both content and structure. This is especially true on the home page, since home pages tend to be different than other pages in both content and structure.

Restricting Styles Two solutions are: 1.Keep the styles that differ in the section of index.htm. All other style definitions from this page can be relocated to the new external CSS file, as long as students want these styles to apply to all pages on their site 2.Assign a unique id to the body tag of the home page, for example, id="home". Then, in the external CSS file, preface those style definitions that apply only to the home page with #home.

Example My index.htm file looks like: <html><head> Mr. Schmidt's Web Portfolio Mr. Schmidt's Web Portfolio </head>

Example My mystyle.css file looks like: h1, h2,p { text-align: center; text-align: center; } h1,#home h2, #home h3 { font-weight: bold; font-weight: bold; color: #FFFFFF; color: #FFFFFF;} These will only be applied to h2 and h3 on the home page. These will be applied to all pages.

Summary External CSS sheets allow you to apply the same styles across all your web pages. Styles can be unique to a web page by adding an id to the body section of the html or by adding that style into the web page. Easier if all styles are in one place Easier if all styles are in one place

Rest of Today Download the instructions for Homework 4-3 from the Hancock WebPage (in the homework section) Complete this assignment today. Show me the results – This is for 2 grades: CSS Code CSS Code External Style Sheet External Style Sheet