Cascading Style Sheets (CSS)

Slides:



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

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
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 External 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
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.
Adding styles. Three alternatives HIT151 Web 'n' Net Web Page Basics /*stylesheet*/ h1,h2,h3 { font-family: verdana, arial, 'sans serif'; } p,table,li.
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.
กระบวนวิชา 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.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
CSS Basic (cascading style sheets)
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
DIV, Span, CSS.
Cascading Style Sheets CSS. Source W3Schools
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.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
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.
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.
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.
Introduction To CSS. Lesson 1: History of CSS CSS was proposed in 1994 as a web styling language. To helps solve some of the problems HTML 4. There were.
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.
Fall 2016 CSULA Saloni Chacha
Cascading Style Sheet.
Getting Started with CSS
CS3220 Web and Internet Programming CSS Basics
Style Sheets.
An Introduction to Cascading Style Sheets
>> Introduction to CSS
Cascading Style Sheets
Introduction to the Internet
Madam Hazwani binti Rahmat
CX Introduction to Web Programming
Introduction to Web programming
Intro to CSS CS 1150 Fall 2016.
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Introduction to CSS.
Intro to CSS CS 1150 Spring 2017.
Software Engineering for Internet Applications
Stylin’ with CSS.
Introduction to Web Authoring
Introduction to Cascading Style Sheets (CSS)
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
CSS Styles Introduction.
Web Design and Development
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
Made By : Lavish Chauhan & Abhay Verma
Cascading Style Sheet.
Creating your own Styles
Stylin’ with CSS.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Stylin’ with CSS.
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
Presentation transcript:

Cascading Style Sheets (CSS)

What is CSS? CSS stands for Cascading Style Sheets. CSS provides a means for web authors to separate the content of web pages from the appearance of web pages of web pages. CSS describes how HTML elements should be displayed.

What is CSS? We'll be learning: Why it's good to use CSS. Where to use CSS. How to use CSS. Styles were added to HTML 4.0 to solve a problem…

Sample CSS http://www.w3schools.com/css/demo_default.htm

Why Use CSS? HTML was never intended to contain tags for formatting a web page! HTML was created to describe the content of a web page, like: <h1>This is a heading</h1> <p>This is a paragraph.</p>

Why Use CSS? The traditional HTML approach was to "hardcode" all of the appearance information about a page. This is know as INLINE styling. If you want headings in courier, at 12pt. then you would need to, for every heading, in every page, set the font type and size. <h1 style="font: Courier; font-size:12px; color:blue">This is a heading.</h1>

Why Use CSS? If you've a large website (ex. 10-100 pages): There was a lot of editing. A lot of re-editing if you decided to modify the appearance of your pages later. With all of that editing there is plenty of possibility for introducing errors. This was a big and expensive Problem!

Styles Solved this Problem To solve this problem, the World Wide Web Consortium (W3C) created CSS. In HTML 4.0, all formatting can be removed from the HTML document, and stored in a separate CSS file. Saves work and therefore less expensive.

How do style sheets work? Style sheets are INTERNAL or EXTERNAL: INTERNAL CSS does the same thing but is in the <head></head> part of the HTML code. EXTERNAL CSS (just simple text files with a .css extension) the rules are in a separate file. Both ensure consistency in a website and make it very easy to make global changes and 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: Identifies the elements (see next slide) in an HTML document that it affects. Tells the browser how to draw these elements.

How do style sheets work? Elements are: 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, that sets the font type, size and alignment.

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

External Style Sheet Why use an External Style Sheet You can use one style sheet for all your pages of your website. Changing the style sheet will affect all the pages of the website. HTML is less crowded, easier to work with. Search engines don’t need to look at CSS

Tips Have a template style sheet saved. Use the template CSS for all your web pages: Just tweak the CSS page to suit the new website.

Class vs ID A Class are not unique: An ID are unique: You can use the same class on multiple elements. You can use multiple classes on the same element. An ID are unique: Each element can have only one ID. Each page can have only one element with that ID.

#specialfont { Adding an ID to CSS Adding an ID to your stylesheet: font-family: font-family: "Times New Roman", Times, serif; color: green }

.specialfont { Adding a Class to CSS Adding a Class to your stylesheet: .specialfont { font-family: font-family: "Times New Roman", Times, serif; color: green }

Using a new CSS Class Highlight the text you wish to have the new class settings. In the Properties select the new class….. or In the code add <p class="specialfont"> The text you want special </p> in your html code

CSS Questions ???