Cascading Style Sheets - Building a stylesheet

Slides:



Advertisements
Similar presentations
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.
Advertisements

Intro To Cascading Style Sheets By Mario Yannakakis.
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) “Styles” for short. Pg. 418.
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.
1 Styles and CSS David Douglas Sam M. Walton College of Business, University of Arkansas “Connecting scholarship and research with business practice”
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.
กระบวนวิชา 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.
1 Creating Web Pages Part 3. 2 CASCADING STYLE SHEETS (CSS): What exactly are they? Set of rules that define how a web browser should display an HTML.
4.01 Cascading Style Sheets
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
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,
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
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.
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.
To Proudly supported by ferrycake.com. We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The.
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.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
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)
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.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
DIV, Span, CSS.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
CSS Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
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.
Cascading Style Sheet.
CSS Cascading Style Sheets
Getting Started with CSS
4.01 Cascading Style Sheets
>> Introduction to CSS
Introduction to the Internet
Madam Hazwani binti Rahmat
Intro to CSS CS 1150 Fall 2016.
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
CSS Cascading Style Sheets
Website Design 3
Cascading Style Sheets - Building a stylesheet
Introduction to CSS.
Intro to CSS CS 1150 Spring 2017.
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets™ (CSS)
DynamicHTML Cascading Style Sheet Internet Technology.
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
Web Design & Development
Cascading Style Sheet.
4.01 Cascading Style Sheets
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Cascading Style Sheets - Building a stylesheet CGS 3066: Lecture 4 Cascading Style Sheets - Building a stylesheet

Purpose CSS defines HOW HTML elements are to be displayed. Styles are normally saved in external “.css” files. External style sheets allow changes to the appearance of all the pages in a Web site by editing one single file!

CSS Syntax A CSS file consists of rule set, which define the presentation element for a particular part of the HTML document. A CSS rule set consists of a selector and a declaration block.

CSS Rule Set A Rule Set has a selector and a declaration block. The declaration block is enclosed in { }. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a property name and a value, separated by a colon. To make the CSS code more readable, you can put one declaration on each line.

CSS Comments CSS comments follow the multiline C comment syntax. A CSS comment starts with /* and ends with */. Comments can also span multiple lines and are ignored by browsers. Single line comments can start with “//”.

CSS Selectors CSS selectors allow you to select and manipulate HTML elements. They are used to "find" HTML elements based on id, classes, types, attributes, values of attributes, etc. Typically, selectors are one of 3 kinds: id selector element selector class selector

Element Selector The element selector selects elements based on the element name. Applied to all elements with the same name (tag) p { text-align: center; color: red; }

ID Selector The id selector uses the id attribute of an HTML tag to find the specific element. An id should be unique within a page. To find an element with a specific id, write a hash character, followed by the id of the element. #para1 { text-align: center; color: red; }

Class Selector The class selector finds elements with the specific class. The class selector uses the HTML class attribute. To find elements with a specific class, write a period character, followed by the name of the class. .center { text-align: center; color: red; }

Class Selector You can also specify that only specific HTML elements should be affected by a class. p.center { text-align:center; color:red; }

Grouping Selectors In style sheets there are often elements with the same style. In the interest of code minimization, we can group selectors. Selectors are separated by commas. h1, h2, p { text-align: center; color: red; }

CSS Backgrounds CSS background properties are used to define the background effects of an element. CSS properties used for background effects: background: all properties in one declaration background-color: color only background-image: set an image as background background-repeat: image repeats (tiled) background-attachment: sets whether a background image is fixed or scrolls with the rest of the page. background-position: sets starting position of a background image.

CSS3 Background CSS3 added a few more properties: background-clip: Specifies the painting area of the background images. background-origin: Specifies the positioning area of the background images. background-size: Specifies the size of the background images.

CSS Text

CSS Text

CSS3 Text effects

CSS Fonts

CSS3 Fonts