Kanida Sinmai ksinmai@hotmail.com http://mis.csit.sci.tsu.ac.th/kanida CSS – Cascading Style Sheets Kanida Sinmai ksinmai@hotmail.com http://mis.csit.sci.tsu.ac.th/kanida.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets Alternative to HTML tag style.
Advertisements

HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
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.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Client-Side Internet and Web Programming
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
Cascading Style Sheet CSS CS1520 Ali Alanjawi. 2 TA Information Ali Alanjawi Homepage: Office:
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.
Unit 20 - Client Side Customisation of Web Pages
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.
CSS Cascading Style Sheets Brief Introduction
CSE CASCADING STYLE SHEETS CSS Faculty of Computer Science and Engineering.
Cascading Style Sheets Example
CSS Dvijesh Bhatt.
1Computer Sciences Department. And use
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
CHAPTER 3 CSS & CSS3 อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
CSS – Cascading Style Sheets
1 CSS محمد احمدی نیا 2 Of 21 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements 
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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 solve a problem External.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
CSS.
Cascading Style Sheets
IS1500: Introduction to Web Development
Cascading Style Sheet.
INTRO TO WEB DEVELOPMENT html
CS3220 Web and Internet Programming CSS Basics
The Internet 10/11/11 Fonts and Colors
CSS: Cascading Style Sheets
( Cascading style sheet )
Semester - Review.
Unit 3 - Review.
Creating Your Own Webpage
CSS Cascading Style Sheets Brief Introduction
CSS Rule Selector Declaration Block Value Attribute Name body {
UNIT-II CSS.
Introduction to the Internet
What is CSS.
CSS.
Cascading Style Sheets
Chapter 6 Lists.
Chapter 7 Page Layout Basics Key Concepts
The Internet 10/25/11 XHTML Tables
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Style Sheet Create a new CSS called Cameras.CSS TD Web Authoring
CSS EXERCISE.
The Internet 10/13/11 The Box Model
Cascading Style Sheets
Software Engineering for Internet Applications
Cascading Style Sheets Color and Font Properties
محمد احمدی نیا CSS محمد احمدی نیا
List Properties Box Properties Pseudoclass
Web Programming Language
CS3220 Web and Internet Programming CSS Basics
Part 1: Cascading Style Sheets
CS3220 Web and Internet Programming CSS Basics
Web Client Side Technologies Raneem Qaddoura
Introduction to Cascading Style Sheets (CSS)
Presentation transcript:

Kanida Sinmai ksinmai@hotmail.com http://mis.csit.sci.tsu.ac.th/kanida CSS – Cascading Style Sheets Kanida Sinmai ksinmai@hotmail.com http://mis.csit.sci.tsu.ac.th/kanida

Inline CSS Inline CSS uses style attribute e.g. <h1 style="color:blue">This is a Blue Heading</h1>

Internal CSS Internal styling is defined in the <head> section of an HTML page, using a <style> element. <!DOCTYPE html> <html> <head> <style> body {background-color:lightgrey} h1 {color:blue} p {color:green} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>

Example: styles.css body { background-color: lightblue; } h1 { color: navy; margin-left: 20px;

CSS background background-color background-image background-repeat background-position

background-color: With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red" h1 { background-color: #6495ed; } p { background-color: rgb(255,0,0); div { background-color: green; See - http://www.w3schools.com/cssref/css_colornames.asp for further information

Background-image body { background-image: url("paper.gif"); }

Background Image - Repeat Horizontally or Vertically body { background-image: url("gradient_bg.png"); background-repeat: repeat-x; } To repeat an image vertically set background-repeat: repeat-y; To show image only once set background-repeat: no-repeat;

background-position body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } Values: left top left center left bottom right top right center right bottom center top center center center bottom

CSS Font p { font-family: "Times New Roman", Times, serif; }

Font style p { font-style: normal; } p.italic { font-style: italic;

Font Size h1 { font-size: 40px; } h2 { font-size: 30px; p { font-size: 14px;

CSS Links a:link { text-decoration: none; background-color: #B2FF99; } a:visited { background-color: #FFFF85; a:hover { text-decoration: underline; background-color: #FF704D; a:active {

CSS Lists <p>Example of unordered lists:</p> <ul class="a"> <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul> <ul class="b"> <p>Example of ordered lists:</p> <ol class="c"> </ol> <ol class="d"> ul.a { list-style-type: circle; } ul.b { list-style-type: square; ol.c { list-style-type: upper-roman; ol.d { list-style-type: lower-alpha;

CSS Lists - image ul { list-style-image: url('sqpurple.gif'); } <li>Coffee</li> <li>Tea</li> <li>Coca Cola</li> </ul>

CSS Table: border table, th, td { border: 1px solid black; } <tr> <th>Firstname</th> <th>Lastname</th> </tr> <td>Peter</td> <td>Griffin</td> <td>Lois</td> </table>