Scripting for Multimedia LECTURE 5: INTRODUCING CSS3

Similar documents
INTRODUCTION TO HTML5! CSS Styles!

2. Write style rules for how you d like certain elements to look.

Assignments (4) Assessment as per Schedule (2)

CSS: Cascading Style Sheets

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

CSS. Location, Inheritance & the Cascade. Copyright DevelopIntelligence LLC

APPENDIX D. Print Style Sheets. This appendix provides the following information:

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

Shane Gellerman 10/17/11 LIS488 Assignment 3

CSS: The Basics CISC 282 September 20, 2014

Creating and Building Websites

CSS Cascading Style Sheets

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

INTRODUCTION TO CSS. Topics MODULE 5

HTML Hyperlinks (Links)

In the early days of the Web, designers just had the original 91 HTML tags to work with.

CSS.

CS144 Notes: Web Standards

Media-Specific Styles

Media Types & Media Features

Introduction to Cascading Style Sheet (CSS)

Navigation. Websites need a formalized system of links to allow users to navigate the site

Comm 244 Week 3. Navigation. Navigation. Websites need a formalized system of links to allow users to navigate the site

Cascading style sheets, HTML, DOM and Javascript

MEXICO 2015, ilab XALAPA

Deccansoft Software Services

Three Ways to Use CSS:

Cascading style sheets

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

CSSSTYLE: Stylish Output with ODS and SAS 9.2 Cynthia L. Zender, SAS Institute Inc., Cary, NC

Creating and Building Websites

YouTube Break.

CSS Cascading Style Sheets

Which is why we ll now be learning how to write in CSS (or cascading sheet style)

Lab Introduction to Cascading Style Sheets

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

COMP519 Web Programming Autumn Cascading Style Sheets

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

HTML/CSS. HTML review and extra CSS review CSS Color

CSS how to display to solve a problem External Style Sheets CSS files

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 3 Test Bank

DAY 4. Coding External Style Sheets

Chapter 3 Style Sheets: CSS

The Benefits of CSS. Less work: Change look of the whole site with one edit

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

Lab 4 CSS CISC1600, Spring 2012

Cascading Style Sheets

To link to an external stylesheet, the link element is placed within the head of the html page:

Web Development & Design Foundations with HTML5

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

CSS. Lecture 16 COMPSCI 111/111G SS 2018

What Is a Style Sheet

Web Development & Design Foundations with HTML5

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

This tutorial will help both students as well as professionals who want to make their websites or personal blogs more attractive.

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

CSS Quiz Result. 2) Where in an HTML document is the correct place to refer to an external style sheet?

Cascading Style Sheets (CSS)

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

HTML (Hyper Text Markup Language) CSS. (Cascading Style Sheets) HTML: problems with styles. HTML: styles. CSS: specifications.

CSS. (Cascading Style Sheets) HTML (Hyper Text Markup Language) HTML: styles. 07/07/2011(mar'09) A.Lioy - Politecnico di Torino ( ) F.

CSS Lecture 16 COMPSCI 111/111G SS 2018

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

CSS. (Cascading Style Sheets)

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

CITS1231 Web Technologies. Introduction to Cascading Style Sheets

CSS Tutorial Part 1: Introduction: A. Adding Style to a Web Page (3 options):

Cascading Style Sheets Level 2

CS7026 Media Queries. Different Screen Size Different Design

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

Midterm 1 Review Sheet CSS 305 Sp 06

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

CS134 Web Site Design & Development. Quiz1

CSS Scripting and Computer Environment - Lecture 09

Introduction to Web Programming and Design

CE419 Web Programming. Session 3: HTML (contd.), CSS

Block & Inline Elements

CSS: formatting webpages

CSS: Layout Part 2. clear. CSS for layout and formatting: clear

('cre Learning that works for Utah STRANDS AND STANDARDS WEB DEVELOPMENT 1

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

CISC1600-SummerII2012-Raphael-lec3 1

IBM Forms V8.0 Custom Themes IBM Corporation

Web Programming Pre-01A Web Programming Technologies. Aryo Pinandito, ST, M.MT

Ministry of Higher Education and Scientific Research

Web Development IB PRECISION EXAMS

CSS. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/43

CSS - Cascading Style Sheets

Creating a Job Aid using HTML and CSS

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors

Transcription:

Scripting for Multimedia LECTURE 5: INTRODUCING CSS3

CSS introduction CSS Level 1 --> CSS Level 2 --> CSS Level 3 (in modules) More than 50 modules are published Cascading style sheets (CSS) defines how HTML elements are displayed background, background colors, margins, fonts, borders, position, etc A style sheet is a set of style rules You can create a style and apply it to many elements based on a selector --> reusability Cascading of CSS

Defining and applying a style A style rule, or style, is composed by: the selector the declaration block Multiple declarations are separated with a semicolon A declaration comprises a CSS property a colon a value

Defining and applying a style body { background-color: white; color: gray;

Adding comments within a style sheet Add comments within a style sheet using /* (start) and */ (end) characters /* This is the style for the body element */ body { background-color: white; /* The rgb value is #ffffff */ color: gray; /* This is the font color */

Creating an inline style Inline style elements having a global style attribute selector is omitted <body style='background-color: white; color: gray;'> </body> Inline style should be avoided It violates reusability Advantage: it overrides styles defined elsewhere

Creating an embedded style You can use <style> element to create an embedded style sheet <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title></title> <style> body { background-color: white; color: gray; </style> </head> <body></body> </html>

Use <link> element to reference an external style sheet file <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title></title> <link rel='stylesheet' type='text/css' href='content/default.css' /> </head> <body></body> </html> body { background-color: white; /* The rgb value is #ffffff */ color: gray; /* This is the font color */

Using media to specify the target device <link> element has a media attribute all braille embossed handheld print screen speech tty tv <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title></title> <link rel='stylesheet' type='text/css' href='content/screen.css' media='screen' /> <link rel='stylesheet' type='text/css' href='content/print.css' media='print' /> </head> <body></body> </html>

Using media to specify the target device

Specifying the character encoding of the style sheet using @charset @charset 'UTF-8'; body { background-color: white; color: gray;

<meta> element in HTML doc will override @charset in CSS file <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title></title> <meta http-equiv='text/html;charset=utf-8' > <link rel='stylesheet' type='text/css' href='content/default.css'/> </head> <body> </body> </html>

Imported style sheets from other style sheets using @import @import must be at the top of a style sheet before any other content except @charset @charset 'UTF-8'; @import url('/content/header.css'); @import url('/content/menu.css'); @import url('/content/sidebar.css'); @import url('/content/maincontent.css'); @import url('/content/footer.css'); body { background-color: white; color: gray;

Imported style sheets from other style sheets using @import You can also specify the media type for each @import @charset 'UTF-8'; @import url('/content/header.css'); screen @import url('/content/menu.css'); screen @import url('/content/sidebar.css'); screen @import url('/content/maincontent.css'); /*default is all */ @import url('/content/footer.css'); print body { background-color: white; color: gray;

Using @font-face rule to import fonts @font-face { font-family: myfont; src: url('fancy_light.ttf'), url('fancy_light.eot'); /* IE9 */ NOTE FONT LICENSING Fonts are intellectual property, just like software, music, and video. Be sure to have the proper license to use any font with the @font-face rule.