Web Pages Week 10 This week: CSS Next week: CSS – Part 2.

Slides:



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

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.
Cascading Style Sheets
Cascading Style Sheets
Today CSS HTML A project.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
Session 4: CSS Positioning Fall 2006 LIS Web Team.
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.
Client-Side Internet and Web Programming
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
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 )
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
Lecture Cascading Style Sheets (CSS) Internal Style Sheets Classes.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
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,
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Cascading Style Sheets Objective: Create an external style sheet, embedded style sheet, and an inline style to change the look and feel of a web site.
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.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
IN THE DOCUMENT OBJECT MODEL, EACH LINE OF HTML IS AN ELEMENT (AN OBJECT), ABLE TO HAVE ATTRIBUTES, PROPERTIES AND VALUES. CSS TELLS THE BROWSER HOW TO.
CSS FOUNDATIONS IN-DEPTH The nitty-gritty of css...
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.
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.
WebD Introduction to CSS By Manik Rastogi.
CSS.
Cascading Style Sheets (CSS) Internal Style Sheets Classes
CSS Box Model.
CSS Box Model.
The Box Model in CSS Web Design – Sec 4-8
4.01 Cascading Style Sheets
( Cascading style sheet )
The Box Model in CSS Web Design – Sec 4-8
Creating Your Own Webpage
CSS Rule Selector Declaration Block Value Attribute Name body {
>> The “Box” Model
Cascading Style Sheets
Cascading Style Sheets (Layout)
The Box Model in CSS Web Design – Sec 4-8
CSS Applications to XML 19-Sep-18.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
The Internet 10/13/11 The Box Model
CSS Borders and Margins.
Second CSS Lecture Applications to XML
Software Engineering for Internet Applications
>> Dynamic CSS Selectors
CSS Box Model.
More CSS 22-Feb-19.
CSS Box Model.
Cascading Style sheet. What is CSS?  CSS stands for Cascading Style Sheets  Cascading: refers to the procedure that determines which style will apply.
Cascading Style Sheets
4.01 Cascading Style Sheets
CSS Applications to XML 20-May-19.
Web Programming and Design
Cascading Style Sheets
CSS Applications to XML 3-Jul-19.
Introduction to Cascading Style Sheets (CSS)
Presentation transcript:

Web Pages Week 10 This week: CSS Next week: CSS – Part 2

CSS CSS = Cascading Style Sheets. Add style to web documents fonts, colors, spacing, size, links

CSS CSS = Cascading Style Sheets. Separates the style and the layout of a web page. The Style is defined in one place The Layout is defined in the web pages May be in the webpage or in a “Master List”

CSS CSS = Cascading Style Sheets. Separates the style and the layout of a web page. The Style is defined in one place The Layout is defined in the web pages A “Master List” allows the Cascade Style to Cascade throughout the web pages.

CSS Easier updating & maintenance Why? Coding is reduced Pages are more efficient, require less bandwidth Standardized layout Greater control

Hello

Greater control CSS Hello

Greater control CSS Font Size Number of Pixels Number of Centimeters, Millimeters, Inches Points ( 1/72”) EM ( size of upper case “M”) Ex ( size of a lower case “x” ) Borders Padding Margin Etc…

Box Model Width Height Left margin Right margin outer edge Top margin Bottom margin Padding

Positioning Static Relative Absolute Fixed Letter Spacing Word Spacing List Style Line Height

Pseudo-selectors First Line First Letter Link Hover Visited

Basic Syntax of a CSS Rule Selector{ property: Rule HTML, Class or ID DECLARATION value; }

Basic Syntax of a CSS Rule Selector{ property: value; } Rule DECLARATION

Basic Syntax of a CSS Rule Selector{ property: value; } Rule DECLARATION

Basic Syntax of a CSS Rule Selector{ property: value; Rule DECLARATION property: value; property: value; }

Basic Syntax of a CSS Rule Selector{ property: value; } Example { font-size: 20px; }h1

Basic Syntax of a CSS Rule Selector{ property: value; } Example { font-size: 20px; color: red; } h1

Basic Syntax of a CSS Rule Selector{ property: value; } Example { font-size: 20px; color: red; border: 2px solid blue;} h1

Basic Syntax of a CSS Rule CSS Rules may be: I nline Embedded External

Basic Syntax of a CSS Rule CSS Rules may be: I nline HTML My Dog Fido CSS My dog Fido

Basic Syntax of a CSS Rule CSS Rules may be: I nline HTML My Dog Fido CSS My dog Fido CSS My dog Fido

Basic Syntax of a CSS Rule CSS Rules may be: I nline Embedded

Basic Syntax of a CSS Rule My web site My Dog Fido Style Info Here!

Basic Syntax of a CSS Rule My web site My Dog Fido h1 {color: red; font-size: 20px; background-color: blue;} My Dog Fido

My web site Adam Billy Charlie David Edward Frank George My web site h1 { color: red;} Adam Billy Charlie David Edward Frank George HTML onlyWith embedded CSS

Basic Syntax of a CSS Rule CSS Rules may be: I nline Embedded External

My web url(pets.css) Important people Adam Billy Charlie David Edward Frank George pets.html h1 { color: red; font-size: 20px; } h2 { color: green; font-size: 30px; } h3 { color: blue; font-size: 50px; } p { color: black; font-size: 10px; background-color: white; border: 5px dotted green; } pets.css

Basic Syntax of a CSS Rule CSS Rules may be: I nline Embedded External Priority

CSS Shortcuts p { color: red; } p { color: #FF0000; } FF F 0 0 p { color: #F00; }

CSS Shortcuts My Dog Fido Border width style color Border-right h1 { border-right-width: 5px; border-right-style: dotted; border-right-color: #F00; } h1 { border: 5px dotted red; }

CSS Shortcuts My Dog Fido Padding h1 { padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; } h1 { border: 5px dotted red; } My Dog Fido

Padding h1 { padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; } h1 { padding: 5px 5px 5px 5px; } My Dog Fido CSS ORDER 1.Top 2.Right 3.Bottom 4.Left

Padding h1 { padding: 10px 5px; } CSS ORDER 1.Top & bottom 2.Right & Left My Dog Fido &32&4

Padding h1 { padding: 5px; } All four sides are equal My Dog Fido

Quick Review h1 { padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; } My Dog Fido h1 { padding: 5px 5px 5px 5px; } h1 { padding: 5px 5px; } h1 { padding: 5px; } Separate Declaration Shorthand Declaration Top/bottom right/left All four sides equal

CSS Cascading Style Sheets. Class website