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.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

Cascading Style Sheets
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.
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:
“Cascading Style Sheets” for styling WWW information DSC340 Mike Pangburn.
กระบวนวิชา 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.
Chapter 6 Web Typography
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.
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.
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.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
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.
The Characteristics of CSS
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
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 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
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.
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)
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.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
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.
HTML - Quiz #2 Attendance CODE:
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
Cascading Style Sheets
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
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.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Introduction. MIS 5450 Behavioral Layer JavaScript and DOM Structural Layer XHTML Presentation Layer CSS Design Development Process.
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 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 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.
Getting Started with CSS
>> Introduction to CSS
Website Design 3
Cascading Style Sheets - Building a stylesheet
Introduction to Cascading Style Sheets (CSS)
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

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 loading pages Increased consistency Brings more sophistication to web design CSS is designed primarily to enable the separation of document content from document presentation.

Why CSS? (continued) W3C standard, started in 1996 Improves accessibility – Tables not required for elegance Reduces the complexity of pages – Which in turn has led to more sophistication… It’s open up the way for other technologies to be built on and be supported by CSS. There are dozens, and still growing. Example, “Bootstrap”, which is an open source framework that combines CSS, HTML and Javascript

CSS Overview CSS (Cascading Style Sheets) CSS defines HTML display Styles were added to HTML 4.0 to solve a problem External Style Sheets are stored in.css files

CSS Syntax Selectors Declaration Properties Values

Selectors A “selector” is an instruction in a CSS rule set that tells the browser what elements to ‘select’ for styling. Here are some that we will look at: – element Selector – id Selector – class Selector – grouping Selectors

Element or Tag Selector This selector selects tags by tag or “element” name. This selector must match one or more HTML elements of the same name. Easiest to use

Element Selector p { text-align: center; color: red; } HTML UAlbany is one of the SUNY centers.

ID Selector The ID selector as a unique identifier to an element. The id selector is used if you want to select a single, unique element. CSS uses a hash or pound sign (#) to indicate it’s ID ID's are unique – IDs in theory, are only supposed to be used once per page – In other words, a page would not be validate by W3C standards. Anytime we see ID in the computer world, think “unique”.

The id Selector #text1 { text-align: center; color: green; } Think Spring!

Class Selector This selector allows you to style content irrespective of what tag you apply it to Classes are NOT unique – Use same class on multiple elements. – Use multiple classes on the same element.

The class Selector.center { text-align: center; color: green; } Think Spring!

CSS Grouping When several selectors share the same declarations, they may be grouped into a comma-separated list. Take this h1 { font-family: sans-serif } h2 { font-family: sans-serif } h3 { font-family: sans-serif } And, do this: h1, h2, h3 { font-family: sans-serif }

CSS Comments As with other computer languages, CSS allows for comments Comments remind you and tell fellow coders what your CSS does Allows you to “flag” code for further review Indispensable for large website and programming projects

CSS Comments h1 { font-size: 24px; font- weight: bold; border: 1px solid black; color: pink; } /* This will make all headers big, bold, pink, and inside of a thin black rectangle! */

Ways to Insert CSS Externally Internally Inline styles (inside tags)

Inline Styles Insert CSS style right within the HTML tag that you want to apply them too. Very quick However, difficult to maintain Use sparingly Think Spring!

Internal (or Embedded) CSS Placed right on top of the page that it will affect As with DTDs, you can internally create a stylesheet They are more convenient for small webpages Mixing content and style will cause your pages to become unwieldy over time.

Internal CSS stylesheet p {color: white; } body {background-color: black; } White text on a black background!

External Stylesheet Why use an external stylesheet? – It keeps your website design and content separate. CSS code is easier to reuse. Instead of typing the same CSS code on every web page you have, Merely have many pages refer to a single CSS file with the "link" tag. You can make massive alterations to your web pages with just a few changes in a single CSS file

External CSS Stylesheet In your.XSL file, you will link out using this command:

Browsers and CSS3 To be replaced by project “Spartan”