Cascading Style Sheets

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.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets
Cascading Style Sheets
Today CSS HTML A project.
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
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.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
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.
CSS(Cascading Style Sheets )
กระบวนวิชา 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.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
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.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
SM5312 week 6: basic CSS syntax1 An Introduction to Cascading Style Sheets Basic CSS Syntax Nick Foxall.
Workshop: CSS-Part I Cascading Style Sheets add style to your HTML web pages.
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,
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
CSS: Cascading Style Sheets. 2 History HTML tags were originally designed to define the content of a document. The layout of the document was supposed.
Review: Three parts to a webpage: - Content - Structure  XHTML - Presentation  CSS In this chapter we will focus on introducing and examining the mechanics.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
CSS Cascading Style Sheets *referenced from
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.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
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.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
CSS.
HTML WITH CSS.
CSS for Styling By Jinzhu Gao.
4.01 Cascading Style Sheets
( Cascading style sheet )
HTML WITH CSS.
Creating Your Own Webpage
Cascading Style Sheets
Cascading Style Sheets
Cascading Style Sheets
Cascading Style Sheets contd: Embedded Styles
Cascading Style Sheets (Layout)
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Introduction to Web programming
>> Dynamic CSS Selectors
Stylin’ with CSS.
Cascading Style Sheets (CSS)
CIS 133 mashup Javascript, jQuery and XML
Web Design & Development
Cascading Style Sheets
Stylin’ with CSS.
Cascading Style Sheets
4.01 Cascading Style Sheets
Web Client Side Technologies Raneem Qaddoura
Stylin’ with CSS.
Web Programming and Design
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Cascading Style Sheets WELCOME to the CSS session

Cascading Style Sheets Who Am I? Affan Javed Co-op Fall 2004 Web Quality Assurance Assistance WebOps – Library University of Waterloo CSS: Syntax Rules Implementation Properties Tips

Cascading Style Sheets Applying CSS: There are three different ways to apply css to a web page. Inline Styles: Styles that are used as attributes within a tag. e.g. <p style="font-size: 90%;"> Internal (Embedded) Styles: Styles that are written within the <head> tag of a web page. External Styles: Styles that are contained in a file external to the web page, specified by a path.

Cascading Style Sheets Syntax: selector { property: value;} selector: Default selectors: h1, p, a, img, … Defined selectors: content, footer, …

Cascading Style Sheets Defined selectors: 2 types of defined selectors. class class is used to identify more than one element. A class selector is a name preceded by a full stop(.) e.g. .indent id id is used to identify only one element. An id selector is a name preceded by a hash character(#) e.g. #main

Cascading Style Sheets Nesting: Nesting is a method in which you can specify properties to selectors within other selectors. e.g. the simple html document is itself an example of nesting because <head> & <body> tags are nested within <html> tag. If I want font size to be smaller in paragraphs only in the main area I would write it as: #main p {font-size: 90%;}

Cascading Style Sheets Grouping: Grouping is a process in which the same properties are applied to a number of selectors separated by commas. e.g. p { padding: 2px;} h1 { padding: 2px;} .top { padding: 2px;} can be written as p, h1, .top { padding: 2px;}

Cascading Style Sheets Comments: /* [comment #1] */ p { color: red; /* [comment #2] */ font: Arial 90%; } Source Formatting: Macromedia Dreamweaver

Cascading Style Sheets Defined Regions: 2 commonly used defined regions: div A block element. [starts on a new line with top & bottom spacing] span An inline element. [starts in same line with no spacing]

Cascading Style Sheets

Cascading Style Sheets Shorthand for color: CSS provides 16,777,216 (256^3) colours. Only 16 colours are pre-defined: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. Different ways: red = rgb(255,0,0) = rgb(100%,0%,0%) = #FF0000 = #F00 The shorthand is to write 6-digit colour in 3- digit version. e.g. #FF6655 = #F65

Cascading Style Sheets

Cascading Style Sheets Anchor pseudo-class: Unvisited link: a:link {color: #FF0000} Visited link: a:visited {color: #00FF00} Mouse over link: a:hover {color: #FF00FF} Selected link: a:active {color: #0000FF}

Cascading Style Sheets

Cascading Style Sheets margin & padding: Note: margins, paddings & borders are not included in the width and height of a region. e.g. a region 200 x 200 px is declared with a padding of 2px on each side. Thus, the total region would be 204 x 204 px. Different ways of declaring margin and padding: (top right bottom left) padding: 10px; means the padding will be 10px on all four sides padding: 10px 2px; means top and bottom padding will be 10px & left and right padding will be 2px

Cascading Style Sheets margin & padding: padding: 10px 2px 15px; means top padding will be 10px, left and right padding will be 2px & bottom padding will be 15px padding: 10px 2px 15px 20px; means top padding will be 10px, right padding will be 2px, bottom padding will be 15px & left padding will be 20px

Cascading Style Sheets border: Shorthand Property: border-width border-style border-color;

Cascading Style Sheets

Cascading Style Sheets http://www.lib.uwaterloo.ca/staff/co-op/tutorial/ Questions?

Cascading Style Sheets THANKS for attending the session