CSS Rule Selector Declaration Block Value Attribute Name body {

Slides:



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

Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Today CSS HTML A project.
Very quick intro HTML and CSS. Sample html A Web Title.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
CSS cont. October 5, Unit 4. Padding We can add borders around the elements of our pages To increase the space between the content and the border, use.
End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา 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.
© 2010, Robert K. Moniot Chapter 5 CSS : Cascading Style Sheets 1.
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.
CS 142 Lecture Notes: CSSSlide 1 body { font-family: Tahoma, Arial, sans-serif; color: black; background: white; margin: 8px; } SelectorDeclaration Block.
4.01 Cascading Style Sheets
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CS 142 Lecture Notes: CSSSlide 1 CSS Rule body { font-family: Tahoma, Arial, sans-serif; color: black; background: white; margin: 8px; } Selector Declaration.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
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.
1 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
CSS Cascading Style Sheets *referenced from
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.
Cascading style sheet TNPW1 Ing. Jiří Štěpánek.
Create a new stylesheet called Hotel Style
Web Development & Design Foundations with XHTML
The Box Model in CSS Web Design – Sec 4-8
CS3220 Web and Internet Programming CSS Basics
Style Sheets.
The Internet 10/11/11 Fonts and Colors
CSS Layouts CH 13.
4.01 Cascading Style Sheets
( Cascading style sheet )
The Box Model in CSS Web Design – Sec 4-8
Creating Your Own Webpage
Chapter 6 Cascading Style Sheets™ (CSS)
CSS.
Cascading Style Sheets
Intro to CSS CS 1150 Fall 2016.
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets
CSS Applications to XML 19-Sep-18.
Cascading Style Sheets: Basics
Introduction to Web programming
Intro to CSS CS 1150 Spring 2017.
CSS – Properties & Values
The Internet 10/13/11 The Box Model
Second CSS Lecture Applications to XML
The Internet 10/6/11 Cascading Style Sheets
How to use the CSS box model for spacing, borders, and backgrounds
More CSS 22-Feb-19.
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
Principles of Web Design 5th Edition
Cascading Style Sheets
4.01 Cascading Style Sheets
CSS Applications to XML 20-May-19.
Web Programming and Design
CSS Applications to XML 3-Jul-19.
Introduction to Cascading Style Sheets (CSS)
Cascading Style Sheets™ (CSS)
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CSS Rule Selector Declaration Block Value Attribute Name body { font-family: Tahoma, Arial, sans-serif; color: black; background: white; margin: 8px; } Value Attribute Name CS 142 Lecture Notes: CSS

Adding Styles to HTML Separate Stylesheet Page-Specific Styles <head> ... <link rel="stylesheet" type="text/css" href="myStyles.css" /> <style type="text/css"> body { font-family: Tahoma, Arial, sans-serif; } </style> </head> <body> <div style=“padding:2px; ... "> </body> Page-Specific Styles Element-Specific Styles CS 142 Lecture Notes: CSS

CSS Color Specifiers Predefined names: white black red … 8-bit hexadecimal intensities for red, green, blue: 0-255 decimal intensities: Percentage intensities: #ff0000 R G B rgb(255,255,0) R G B rgb(80%,80%,100%) R G B CS 142 Lecture Notes: CSS

CSS Element Boxes Parent’s background used in margin area Border Padding Element Content Padding Element’s background used in padding area CS 142 Lecture Notes: CSS

CSS Distances 2px pixels 1mm millimeters 2cm centimeters 0.2in inches 3pt printer’s points 2em, 4ex other printer’s units CS 142 Lecture Notes: CSS

CSS: HTML: body { font-family: Tahoma, Arial, sans-serif; font-size: 13px; color: black; background: white; margin: 8px; } h1 { font-size: 19px; margin-top: 15px; margin-bottom: 5px; border-bottom: 1px solid black .shaded { background: #d0d0ff; <body> <h1>First Section Heading</h1> <p> Here is the first paragraph, containing text that really doesn't have any use or meaning; it just prattles on and on, with no end whatsoever, no point to make, really no purpose for existence at all. </p> <div class="shaded"> <h1>Another Section Heading</h1> Another paragraph. </div> </body> CS 142 Lecture Notes: CSS

CS 142 Lecture Notes: CSS