Cascading Style Sheets (CSS)

Slides:



Advertisements
Similar presentations
Introduction to HTML & CSS
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
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.
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.
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.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Instructional Technology & Design Office or Insert Workshop Name Presented by Your Name Here.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
4.01 Cascading Style Sheets
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Basics of HTML.
Creating Tables in a Web Site Using an External Style Sheet
Cascading Style Sheet. What is CSS? CSS stands for Cascading Style Sheets. CSS are a series of instruction that specify how markup elements should appear.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
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.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
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.
 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.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
INTRODUCTION TO CSS. OBJECTIVES: D EFINE WHAT CSS IS. K NOW THE HISTORY OF CSS. K NOW THE REASON WHY CSS IS USED. CSS SYNTAX. CSS ID AND CLASS.
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.
 cascade Style Sheets (CSS) is a mark-up language that was first proposed in 1994 by Håkon Wium Lie. CSS works in conjunction with HTML to greatly increase.
Essentials of HTML Class 4 Instructor: Jeanne Hart
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Professor Waterman Cascading Style Sheets (CSS) is a language that works with HTML documents to define the way content is presented. The presentation.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
Cascading Style Sheets CSS. Source W3Schools
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.
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.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
External Style Sheets Exploring Computer Science – Lesson 3-6.
Cascading Style Sheets (CSS) EXPLORING COMPUTER SCIENCE – LESSON 3-5.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
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.
Group 9: Through examples, explain how to build a css navigation bar. Presented by: Daniel Ku, Matt Iannacci & Iphia Henry.
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.
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.
Web Basics: HTML/CSS/JavaScript What are they?
The Box Model in CSS Web Design – Sec 4-8
4.01 Cascading Style Sheets
The Box Model in CSS Web Design – Sec 4-8
Introduction to basic HTML
>> Introduction to CSS
Introduction to CSS.
Styles with Cascading Style Sheets (CSS)
CX Introduction to Web Programming
Styles with Cascading Style Sheets (CSS)
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets
Website Design 3
Introduction to CSS.
Software Engineering for Internet Applications
What are Cascading Stylesheets (CSS)?
Training & Development
Web Design and Development
Introduction to CSS.
Web Design & Development
4.01 Cascading Style Sheets
Presentation transcript:

Cascading Style Sheets (CSS) Exploring Computer Science – Lesson 3-5

Objectives The student will be able to: • Create inline styles with CSS. • Create a web page that uses inline styles. • Create an internal style sheet with CSS. • Create a web page that uses an internal style sheet.

Cascading Style Sheets (CSS) CSS is a markup language It is used to define the style of the page (such things as font type, size and many other attributes) as well as to control the overall page layout.

Benefits of CSS CSS allows a single style to be used across an entire site, which makes site maintenance easy With CSS, HTML documents are kept cleaner, and easier for developers to update and maintain CSS is efficient, and can result in pages that download quickly. CSS allows separation of web content from presentation, which means the content can be delivered to users across all web-enabled devices (including browsers, cell phones, PDAs, etc.) in a way that best meets the needs of the users of those devices. This translates to a more accessible web for all users.

General CSS Format – Internal Style Sheet When using internal CSS, you must add a new tag, <style>, inside the <head> section. The HTML code below contains an example of <style>'s usage: <html> <head> <title>The document title </title> <style> </style> </head> <body> <p>Your page's content!</p> </body> </html>

CSS CSS is a different language than HTML with very different syntax. It does NOT use angle brackets around element names, etc. CSS is not HTML, but rather a way of manipulating existing HTML Like HTML, it is important with CSS to be careful to use correct syntax, and to use indentation to keep the document well organized.

Example of CSS – Internal Style Sheet <html> <head> <style> p {color: white; } body {background-color: black; } </style> </head> <body> <p>White text on a black background!</p> </body> </html> Result:

General CSS Format HTML_tag { "CSS Property" : "Value" ; } Back in our code example, we manipulated <p> and <body> tags In the first line of CSS code changed the "p“ tag. We chose the HTML element we wanted to manipulate. - p{ : ; } Then we chose the CSS attribute “color”. - p { color: ; } Next we choose the font color to be white. - p { color: white; } Now all text within a paragraph tag will show up as white.

General CSS Format In the second line we changed the body tag. We choose the HTML element Body - body { : ; } Then we chose the CSS attribute. - body { background-color: ; } Next we chose the background color to be black. - body { background-color: black; } Now background for the body section of our document is black.

Inline Styles If the style you desire is only for the a certain instance of a tag (e.g. for a single paragraph) then you can apply the style within the tag. You simply add a “style=“ attribute and put the styles with no { } in the tag itself Example: I want my first paragraph to be indented and with a white border. I can change my <p> tag to <p style="margin: 0 5em 0 5em; padding 3em; border: 2px solid white; font-size: 2em;">

HTML_tag { "CSS Property" : "Value" ; } Summary Place your CSS Code between <style> and </style> Be sure you know the correct format (syntax) of CSS code. The 3 parts of a CSS: HTML_tag { "CSS Property" : "Value" ; }

Where to find help on CSS General CSS: http://w3schools.com/css Common CSS Properties: https://developer.mozilla.org/en- US/docs/Web/CSS/CSS_Properties_Reference Colors: http://www.w3schools.com/tags/ref_colornames.asp http://www.w3schools.com/tags/ref_colorpicker.asp

Rest of Today Look at http://www.georgebenainous.com/web (html/css-­‐-­‐basic markup) Step through his examples and understand the CSS code. Add a style section to the head part of your HTML file. Add CSS code to set the styles for: body h1 h2 p ol or ul li

Next Time At the end of our next class, we will walk around and look at each other’s web pages. You will vote on the best 3 web pages in the room. The 3 students with the highest votes will get extra credit.