Introduction to CSS. What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML.

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

Introduction to HTML & CSS
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
Intro To Cascading Style Sheets By Mario Yannakakis.
Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
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.
/k/k 1212 Cascading Style Sheets Part one Marko Boon
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.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
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.
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.
HyperText Markup Language (HTML) Uses plain text to add markup instructions to a file. If you can't produce it with a standard keyboard, it can't go into.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
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.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
“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.
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.
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,
Basics of HTML.
The Characteristics of CSS
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
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.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
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)
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Advanced Web Development Instructor: Thomas Bombach.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
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.
3. Cascading Style Sheets (CSS) M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
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.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
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.
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.
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.
Style Sheets.
4.01 Cascading Style Sheets
>> Introduction to CSS
INTRODUCTION TO HTML AND CSS
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
CX Introduction to Web Programming
Introduction to Web programming
Website Design 3
Introduction to HTML Today we will look at:
Software Engineering for Internet Applications
Introduction to Cascading Style Sheets (CSS)
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets
INTRODUCTION TO HTML AND CSS
4.01 Cascading Style Sheets
Introduction to Cascading Style Sheets (CSS)
Presentation transcript:

Introduction to CSS

What is CSS? A CSS (cascading style sheet) file allows you to separate your web sites (X)HTML content from it’s style. Use your (X)HTML file to arrange the content, but all of the presentation (fonts, colors, background, borders, text formatting, link effects & so on…) can be accomplished using CSS.

Internal Stylesheet Simply place the CSS code within the tags of each (X)HTML file you want to style with the CSS. Example: CSS Content Goes Here

External Stylesheet An external CSS file can be created with any text or HTML editor such as “Notepad”. A CSS file contains no (X)HTML, only CSS. You simply save it with the.css file extension. You can link to the file externally by placing the following links in the head section of every (X)HTML file you want to style with the CSS file.

Example in HTML

CSS Syntax The syntax for CSS is different than that of (X)HTML markup. It consists of only 3 parts. selector { property: value } The selector is the (X)HTML element that you want to style. The property is the actual property title, and the value is the style you apply to that property. Example: body { background: #eeeeee; font-family: “Trebuchet MS”, Verdana, Arial, serif; }

Inheritance When you nest one element inside another, the nested element will inherit the properties assigned to the containing element. Unless you modify the inner elements values independently. Example: body {font-family: Verdana, serif;}

Inheritance If you wanted to style certain text with another font, like an h1 or a paragraph then you could do the following. h1 {font-family: Georgia, sans- serif;} p {font-family: Tahoma, serif;}

Combining Selectors You can combine elements within one selector in the following fashion. h1, h2, h3, h4, h5, h6 { color: #009900; font-family: Georgia, sans-serif; }

CSS Classes The class selector allows you to style items within the same (X)HTML element differently. You can use the same class selector again and again within an (X)HTML file.

CSS Classes - Example Original.css file: p { font-size: small; color: # }

CSS Classes - Example I would to change the word “brown” in the sentence The Quick Brown Fox Jumps Over The Lazy Dog. The Quick Brown Fox Jumps Over The Lazy Dog.

CSS Classes - Example In the.css file, it would appear as:.brownboldtext{ font-size: small; color: #B18904; font-weight: bold; } Please note that a class selector begins with a (.) period.

CSS IDs IDs are similar to classes, except once a specific id has been declared it cannot be used again within the same (X)HTML file. Use IDs to style the layout elements of a page that will only be needed once.

Example in HTML You may put in your whole document inside this division.

Example in.css #container{ width: 80%; margin: auto; padding: 20px; border: 1px solid #666; background: #ffffff; } You will notice that the id selector begins with a (#) number sign instead of a (.) period, as the class selector does.

Organising Data with Tables Create table in HTML:

Example Book Title Availability Quantity Price Don’t Make Me Think by Steve Krug In Stock 1 $30.02 A Project Guide to UX Design by Russ Unger & Carolyn Chandler In Stock 2 $52.94 ($26.47 × 2) Introducing HTML5 by Bruce Lawson & Remy Sharp Out of Stock 1 $22.23 Bulletproof Web Design by Dan Cederholm In Stock 1 $30.17

Merging Columns and Rows Use to merge columns and to merge rows Example: merging 2 columns Example Example: merging 2 rows Example