Document Structure. Document Appearance. Interactivity

Size: px
Start display at page:

Download "Document Structure. Document Appearance. Interactivity"

Transcription

1 Crash Course in CSS

2 Document Structure Document Appearance Interactivity 2

3 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 of separating content from the way it is formatted and displayed External Style Sheets can save a lot of work by adding formatting and display configuration to an entire web site External Style Sheets are stored in.css files CSS is a way to style and present the information offered in an HTML page. Whereas the HTML is the meaning or content, the style sheet is the presentation of that document, including its font size and type, item colors, item formatting, margins and padding, rows and columns, in short the look and feel of a web page or entire web site. 3

4 out H1 P H3 P P 4

5 We re focusing on programming JavaScript Many web pages provide interactivity by changing their appearance Form validation: highlight the wrong elements Changing (adding, removing) elements on the page with a specific style so that they stand out You can create 2D games! CSS can be used to position things CSS +JavaScript can move things around CSS selector syntax is re-used by jquery to identify items on a page 5

6 CSS is a separate language. Since it has a different purpose (appearance) than HTML (structure), it has a different form Goal: Get a feel for the language Goal: Be able to use a couple of CSS properties CSS & HTML are commonly mixed into the same file THIS IS GOING TO TAKE SOME GETTING USED TO, but you can do it! Goal: Be able to identify which parts of a single file are the HTML parts (and obey HTML rules), and which are the CSS parts (and obey the CSS rules) Goal: Be able to identify an external style sheet, and open / read the external stylesheet Goal: Understand that in this class we re going to mostly stick with internal stylesheets, at least for now 6

7 Styles can be specified three ways: inside an HTML element (Inline Style) inside the head section of an HTML page (Internal Style Sheet) in an external CSS file (External Style Sheet) Tip: multiple external style sheets can be referenced inside a single HTML document. 7

8 Cascading Order YOU DO NOT NEED TO REMEMBER THIS!!! What style will be used when there is more than one style specified for an HTML element? Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority: 1. Browser default 2. External style sheet 3. Internal style sheet (in the head section) 4. Inline style (inside an HTML element) So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style defined inside the <head> tag, or in an external style sheet, or in a browser (a default value). NOTE: If the link to the external style sheet is placed after the internal style sheet in HTML <head>, the external style sheet will override the internal style sheet! 8

9 Inline Style Inline style does exactly what it sounds like, it adds a style or styles in direct line with the HTML code itself (i.e., it is "embedded" inline with the HTML code) An inline style loses many of the advantages of style sheets because the inline style mixes content with presentation. To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example below shows how to change the font color and the left and right margins of a paragraph: <p style="color:sienna; margin-left:20px; margin-right:600px;">this DEMONSTRATES THE INLINE METHOD OF CSS DECLARATION. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pellentesque iaculis luctus. Phasellus quis faucibus turpis. Ut convallis quam id risus mattis lobortis. Cras quis augue vulputate, laoreet mauris id, pharetra ligula. Curabitur placerat sem eros, non rhoncus justo sollicitudin eu.</p> 9

10 Internal Style Sheet An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this: <head> <style> p {margin-left:20px; margin-right:600px; color:red;} body {background-color: #ffff99;} </style> </head> 10

11 External Style Sheet An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section: index.html <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> An external style sheet can be written in any text editor. The file should not contain any html tags. Your style sheet should be saved with a.css extension and given any name you choose appropriate to your design intentions (e.g., style.css). An example of a style sheet file is shown below: style.css p {color:red; margin-left:20px; margin-right:600px; } body {background-color: #cccc66; } FYI: link rel is link relation and in our case it is a "stylesheet". There are other types of relations besides stylesheet, like author, help, license, search, to name a few. 11

12 Commenting HTML Comment <!-- Comment Goes Here --> CSS Comment /* Comment Goes Here */ 12

13 Go to the exercises for today Find the exercise for identifying CSS & HTML regions of a file Do that exercise 13

14 14

15 CSS Syntax for internal & external stylesheets A CSS declaration always ends with a semicolon, and declaration groups are surrounded by curly brackets or "squiggles": p {color:red; text-align:center;} 15

16 The element Selector Simply list the name of an element (such as p, or a, or li, or div, or span, or.) and ALL paragraphs/anchors/list items/divs/spans/etc will have that style applied. In the CSS p { background-color: azure; } In the HTML <p>this paragraph has a very light blue background-it s azure!</p> 16

17 The id Selector: # Standards specify that any given id name can only be referenced once within a page or document. From my experience, ids are most commonly used correctly in CSS layouts to identify a single, specific thing on the page. This makes sense because there are usually only one 'wrapper' per page, or only one menu, one banner, usually only one content pane, etc. What this means is, two elements cannot use the same id. If you want to do that, then you would create and use a class (which we'll talk about a bit later). NOTE: Do NOT start an id name with a number! It will not work in Firefox. In the CSS #wrapper { width:70%; sets width of element in relation to the browser margin:0px auto; background-color: greenyellow; } In the HTML <p id="wrapper"> Some stuff goes here <a href= etc. </p> 17

18 The class Selector:. The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements. This allows you to set a particular style for many HTML elements with the same class. The class selector is defined with a period or "dot":. NOTE: You can name a class anything you want, although it is recommended you give it a name according to its function. In the example below, all HTML elements with class="center" will be center-aligned: In the CSS.center {text-align:center;} In the HTML <h1 class="center">rex Winkus's Portfolio</h1> <p class="center">week 01</p> <p>this is the stuff in the first week</p> <p class="center">week 02</p> <p>this is the stuff in the second week</p> W3Schools: Class vs ID 18

19 Do Exercise #2 Then move on to the next topic: figuring out some CSS styles on your own: exercises #3-9 Fun fact: the popular JavaScript library named jquery uses CSS selector syntax to identify which part(s) of the page to dynamically modify using JavaScript. 19

20 20

21 Basic CSS Properties: color The color property specifies the color of text. In the CSS body {color:red;} h1 {color:#00ff00;}.ex {color:rgb(0,0,255);} In the HTML Value color inherit Description Specifies the text color. Look at CSS Color Values for a complete list of possible color values. (W3Schools also has a list of the predefined color names (like red, green, blue, aqua, etc, etc.). Specifies that the color should be inherited from the parent element <h1>this is heading 1</h1> <p>this is an ordinary paragraph. Notice that this text is red. The default textcolor for a page is defined in the body selector.</p> W3Schools: color <p class="ex">this is a paragraph with class="ex". This text is blue.</p> 21

22 The background-color Property The background-color property sets the background color of an element. background-color:green; W3Schools: background-color 22

23 HTML Color Codes /* RGB model */ #F00 /* 3-digit shortchand hex form #rgb */ #FF0000 /* 6-digit traditional hex form #rrggbb */ rgb(255, 0, 0) /* integer range */ rgb(100%, 0%, 0%) /* float range 0.0% % */ /* RGB with alpha channel, added to CSS3 */ rgba(255, 0, 0, 0.5) /* 0.5 opacity, semi-transparent */ /* HSL model, added to CSS3 */ hsl(0, 100%, 50%) /* red */ hsl(120, 100%, 50%) /* green */ hsl(120, 100%, 25%) /* dark green */ hsl(120, 100%, 75%) /* light green */ hsl(120, 50%, 50%) /* pastel green */ /* HSL model with alpha channel */ hsla(120, 100%, 50%, 1) /* green */ hsla(120, 100%, 50%, 0.5) /* semi-transparent green */ hsla(120, 100%, 50%, 0.1) /* very transparent green */ Red/Green/Blue Hecadecimal Triplets abcdef Red/Green/Blue RGB Decimal Code X11 Color Names thistle, magenta, indigo, gray, grey HSL/HSV hue-saturation-lightness -value 0-360, 0-100%, 0-100% Web Safe Colors VGA (6 6 6 = 216) each from 00 to FF

24 HTML Color Codes You are expected to be able to change the color of stuff on in-class exercises, homeworks, etc from memory You are expected to recognize the color property, and be able to use at least the words red, green, and blue on quizzes & exams You are NOT expected to remember anything else from the prior slide Specifically, you will not be asked about hexadecimal# s 24

25 Some Other Basic CSS Properties: font-family In the CSS [remember, that these class names can be anything you want].serif { font-family:"times New Roman",Times,serif; }.sanserif { font-family:arial,helvetica,sans-serif; } In the HTML <h1 class="serif">this is heading 1</h1> <h2 class="sansserif">this is heading 2</h2> <p class="serif">this is a paragraph.</p> <p class="sansserif">this is a paragraph.</p> W3Schools: font-family 25

26 Some Other Basic CSS Properties: font-size In the CSS h1 {font-size:250%;} h2 {font-size:200%;}.ften {font-size:10pt;}.bypixel {font-size:10px;}.f875em {font-size:0.875em;} In the HTML An "em" is a relative property based on the default font-size of the browsers, which is typically 16px. For example, this means that: 1em = (16 x 1) = 16px = 100% 1.25em (16 x 1.25) = 20px = 125% 0.75em (16 x 0.75) = 12px = 75% 2em (16 x 2) = 32px = 200% <h1>this is heading 1</h1> <h2>this is heading 2</h2> <p>this is a paragraph.</p> <p class="ften">this is a paragraph.</p> <p class="f875em">this is a paragraph.</p> W3Schools: font-size 26

27 Some Other Basic CSS Properties: font-style In the CSS [remember, that these class names can be anything you want].normal {font-style:normal;}.italic {font-style:italic;}.oblique {font-style:oblique;} In the HTML <p class="normal">this is a paragraph, normal.</p> <p class="italic">this is a paragraph, italic.</p> <p class="oblique">this is a paragraph, oblique.</p> <h2 class="oblique">this is a heading1, oblique.</h2> W3Schools: font-style 27

28 Some Other Basic CSS Properties: text-align The text-align property specifies the horizontal alignment of text in an element. In the CSS h1 {text-align:center} h2 {text-align:left} h3 {text-align:right} In the HTML Value left right center justify Description Aligns to the left Aligns to the right Centers the text stretches the lines so each line has equal width <h1>this is heading 1</h1> <h2>this is heading 2</h2> <h3>this is heading 3</h3> W3Schools: text-align 28

29 Just for fun: Assorted Tips & Tricks Tips & Tricks HTML5 & CSS3 Readiness Chart Can I Use? Initializer Front End Tools for Workflow The ToolBox HTML/CSS Frameworks Blueprint Bluetrip Elements Malo CSS Tips & Tricks CSS3.me Generator CSS3Generator LayerStyles Gradient Editor Arrow Please Create CSS3 CSS Values 29

30 Exercises #3 9 (If you haven't done so already ) 30

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

What is CSS? NAME: INSERT OPENING GRAPHIC HERE: What is CSS? NAME: INSERT OPENING GRAPHIC HERE: Highlight VOCABULARY WORDS that you need defined. Put a? mark in any area that you need clarified. 1 What is CSS? CSS stands for Cascading Style Sheets Styles

More information

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS cristina gena dipartimento di informatica cgena@di.unito.it http://www.di.unito.it/~cgena/ materiale e info sul corso http://www.di.unito.it/~cgena/teaching.html

More information

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

CSS how to display to solve a problem External Style Sheets CSS files WEB DESIGN 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 Style Sheets can save a lot of work External

More information

Assignments (4) Assessment as per Schedule (2)

Assignments (4) Assessment as per Schedule (2) Specification (6) Readability (4) Assignments (4) Assessment as per Schedule (2) Oral (4) Total (20) Sign of Faculty Assignment No. 02 Date of Performance:. Title: To apply various CSS properties like

More information

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS BASICS OF WEB DESIGN CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS 1 LEARNING OUTCOMES Describe the purpose of Cascading Style Sheets List advantages of using Cascading Style Sheets Configure color

More information

Three Ways to Use CSS:

Three Ways to Use CSS: Introduction to CSS CSS Defined: Short for "Cascading Style Sheets". Determines how the elements in our XHTML documents are displayed and formatted. Designed to separate the content of a web page from

More information

CSS stands for Cascading Style Sheets Styles define how to display HTML elements

CSS stands for Cascading Style Sheets Styles define how to display HTML elements CSS stands for Cascading Style Sheets Styles define how to display HTML elements CSS has various levels and profiles. Each level of CSS builds upon the last, typically adding new features and typically

More information

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student Welcome Please sit on alternating rows powered by lucid & no.dots.nl/student HTML && CSS Workshop Day Day two, November January 276 powered by lucid & no.dots.nl/student About the Workshop Day two: CSS

More information

Cascading style sheets, HTML, DOM and Javascript

Cascading style sheets, HTML, DOM and Javascript CSS Dynamic HTML Cascading style sheets, HTML, DOM and Javascript DHTML Collection of technologies forming dynamic clients HTML (content content) DOM (data structure) JavaScript (behaviour) Cascading Style

More information

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

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

More information

BIM222 Internet Programming

BIM222 Internet Programming BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements

More information

Agenda. Combining Rules & Selectors Classes, IDs and DIVs

Agenda. Combining Rules & Selectors Classes, IDs and DIVs CSS Rules Agenda Combining Rules & Selectors Classes, IDs and DIVs 2 Border Styles Placing the above rule associated with h1 selector, will draw a line - 1 pixel wide - under the heading in our site (you

More information

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

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model) INTRO TO CSS RECAP HTML WHAT IS CSS ADDING CSS TO YOUR HTML DOCUMENT CSS IN THE DIRECTORY TREE CSS RULES A FEW CSS VALUES (colour, size and the box model) CSS SELECTORS SPECIFICITY WEEK 1 HTML In Week

More information

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1 CREATING A WEBSITE USING CSS Mrs. Procopio CTEC6 MYP1 HTML VS. CSS HTML Hypertext Markup Language CSS Cascading Style Sheet HTML VS. CSS HTML is used to define the structure and content of a webpage. CSS

More information

Introduction to Cascading Style Sheet (CSS)

Introduction to Cascading Style Sheet (CSS) Introduction to Cascading Style Sheet (CSS) Digital Media Center 129 Herring Hall http://dmc.rice.edu/ dmc-info@rice.edu (713) 348-3635 Introduction to Cascading Style Sheets 1. Overview Cascading Style

More information

CSS: formatting webpages

CSS: formatting webpages CSS: formatting webpages Why CSS? separate content from formatting (style) style can be changed easily without rewriting webpages keep formatting consistent across website allows more advanced formatting

More information

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

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo Note: We skipped Study Guide 1. If you d like to review it, I place a copy here: https:// people.rit.edu/~nbbigm/studyguides/sg-1.docx

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css images boris.jpg Types of CSS External Internal Inline External CSS An external style sheet is a text document with

More information

Introduction to WEB PROGRAMMING

Introduction to WEB PROGRAMMING Introduction to WEB PROGRAMMING Web Languages: Overview HTML CSS JavaScript content structure look & feel transitions/animation s (CSS3) interaction animation server communication Full-Stack Web Frameworks

More information

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

HTML/CSS. HTML review and extra CSS review CSS Color HTML/CSS HTML review and extra CSS review CSS Color ID Every HTML element can carry the id attribute ID is used to uniquely identify that element from other elements on the page Can be used to allow the

More information

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

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Make a Website A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1 Overview Course outcome: You'll build four simple websites using web

More information

Unit 20 - Client Side Customisation of Web Pages WEEK 5 LESSON 6 DESIGNING A WEB-SITE

Unit 20 - Client Side Customisation of Web Pages WEEK 5 LESSON 6 DESIGNING A WEB-SITE Unit 20 - Client Side Customisation of Web Pages WEEK 5 LESSON 6 DESIGNING A WEB-SITE Today s tasks This lesson is on the wiki: Design Exercise (for A3); corporate theme in primary design 3rd November

More information

Reading 2.2 Cascading Style Sheets

Reading 2.2 Cascading Style Sheets Reading 2.2 Cascading Style Sheets By Multiple authors, see citation after each section What is Cascading Style Sheets (CSS)? Cascading Style Sheets (CSS) is a style sheet language used for describing

More information

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

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006 HTML, CSS Comp-206 : Introduction to Software Systems Lecture 23 Alexandre Denault Computer Science McGill University Fall 2006 Course Evaluation - Mercury 22 / 53 41.5% Assignment 3 Artistic Bonus There

More information

Let's take a look at what CSS looks like in Dreamweaver using the "Embedded" coding which is the styles are within the html code and not separate.

Let's take a look at what CSS looks like in Dreamweaver using the Embedded coding which is the styles are within the html code and not separate. Creating web pages using CSS and Dreamweaver CS3 Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of a document written in a markup language. Its most common application

More information

CSS. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)

CSS. M hiwa ahamad aziz  Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz) CSS M hiwa ahamad aziz www.raparinweb.fulba.com Raparin univercity 1 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

More information

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2 Web Programming and Design MPT Senior Cycle Tutor: Tamara Week 2 Plan for the next 4 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style Introduction to JavaScript

More information

CSS Scripting and Computer Environment - Lecture 09

CSS Scripting and Computer Environment - Lecture 09 CSS Scripting and Computer Environment - Lecture 09 Saurabh Barjatiya International Institute Of Information Technology, Hyderabad 1 st October, 2011 Contents 1 CSS stands for Cascading Style Sheets Styles

More information

CSS Cascading Style Sheets

CSS Cascading Style Sheets CSS Cascading Style Sheets site root index.html about.html services.html stylesheet.css charlie.jpg Linking to your HTML You need to link to your css in the of your HTML file.

More information

CSS. https://developer.mozilla.org/en-us/docs/web/css

CSS. https://developer.mozilla.org/en-us/docs/web/css CSS https://developer.mozilla.org/en-us/docs/web/css http://www.w3schools.com/css/default.asp Cascading Style Sheets Specifying visual style and layout for an HTML document HTML elements inherit CSS properties

More information

COSC 2206 Internet Tools. CSS Cascading Style Sheets

COSC 2206 Internet Tools. CSS Cascading Style Sheets COSC 2206 Internet Tools CSS Cascading Style Sheets 1 W3C CSS Reference The official reference is here www.w3.org/style/css/ 2 W3C CSS Validator You can upload a CSS file and the validator will check it

More information

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework Presented by Roel Fermont 1 Today more than ever, Cascading Style Sheets (CSS) have a dominant place in online business. CSS

More information

CSC 337. Cascading Style Sheets. Marty Stepp, Rick Mercer

CSC 337. Cascading Style Sheets. Marty Stepp, Rick Mercer CSC 337 Cascading Style Sheets Marty Stepp, Rick Mercer Preview of a style sheet /* The good way, with a preview of cascading style sheet (css) that has class mystyle */ body { background-color: grey;.mystyle

More information

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

Downloads: Google Chrome Browser (Free) -   Adobe Brackets (Free) - Week One Tools The Basics: Windows - Notepad Mac - Text Edit Downloads: Google Chrome Browser (Free) - www.google.com/chrome/ Adobe Brackets (Free) - www.brackets.io Our work over the next 6 weeks will

More information

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

<body bgcolor=  fgcolor=  link=  vlink=  alink= > These body attributes have now been deprecated, and should not be used in XHTML. CSS Formatting Background When HTML became popular among users who were not scientists, the limited formatting offered by the built-in tags was not enough for users who wanted a more artistic layout. Netscape,

More information

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model Unit 20 - Client Side Customisation of Web Pages Week 2 Lesson 4 The Box Model Last Time Looked at what CSS is Looked at why we will use it Used CSS In-line Embedded (internal style-sheet) External

More information

HTML/XML. HTML Continued Introduction to CSS

HTML/XML. HTML Continued Introduction to CSS HTML/XML HTML Continued Introduction to CSS Entities Special Characters Symbols such as +, -, %, and & are used frequently. Not all Web browsers display these symbols correctly. HTML uses a little computer

More information

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style precedence and style inheritance Understand the CSS use

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 6 Slide 1 of 28 Week 6 Agenda

More information

CSS: Cascading Style Sheets

CSS: Cascading Style Sheets CSS: Cascading Style Sheets Computer Science and Engineering College of Engineering The Ohio State University Lecture 13 Evolution of CSS MIME type: text/css CSS 1 ('96): early recognition of value CSS

More information

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:

More information

Cascading Style Sheet KAVERI KAR (ASSISTANT PROFESSOR) SSIPMT, RAIPUR

Cascading Style Sheet KAVERI KAR (ASSISTANT PROFESSOR) SSIPMT, RAIPUR Cascading Style Sheet Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable. CSS handles the look and feel part

More information

CSS WHAT IS IT? HOW DOES IT WORK? (LOOK N GOOD)

CSS WHAT IS IT? HOW DOES IT WORK? (LOOK N GOOD) CSS (LOOK N GOOD) CSS is short for Cascading Style Sheets. This is the stuff that allows you to add formatting and styling your web pages. WHAT IS IT? Let me show you HOW DOES IT WORK? If you have a headline

More information

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference Inline Style Syntax: Introduction to Web Design CSS Reference Example: text Internal Style Sheet Syntax: selector {property: value; Example:

More information

CSS exercise - Part 1

CSS exercise - Part 1 ITIY3 Introduction to Web Publishing 1 CSS exercise - Part 1 Adding text styles to an HTML document To start the exercise open the exercise file in the editor (Notepad++ or other). Inspect the element

More information

Appendix D CSS Properties and Values

Appendix D CSS Properties and Values HTML Appendix D CSS Properties and Values This appendix provides a brief review of Cascading Style Sheets (CSS) concepts and terminology, and lists CSS level 1 and 2 properties and values supported by

More information

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

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets CMPT 165: Cascading Style Sheets Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 7, 2011 Methods for configuring Cascading Style Sheets There are 4 method to

More information

ITNP43: HTML Lecture 4

ITNP43: HTML Lecture 4 ITNP43: HTML Lecture 4 Niederst, Part III (3rd edn) 1 Style versus Content HTML purists insist that style should be separate from content and structure HTML was only designed to specify the structure and

More information

Chapter 3 Style Sheets: CSS

Chapter 3 Style Sheets: CSS WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE JEFFREY C. JACKSON Chapter 3 Style Sheets: CSS 1 Motivation HTML markup can be used to represent Semantics: h1 means that an element is a top-level heading

More information

7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6. Phone: Toll Free: Fax:

7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6. Phone: Toll Free: Fax: HTML and CSS 7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6 Phone: 905-479-3780 Toll Free: 877-479-3780 Fax: 905-479-1047 e-mail: info@andarsoftware.com Web: www.andarsoftware.com.com Copyright

More information

Cascading Style Sheets Level 2

Cascading Style Sheets Level 2 Cascading Style Sheets Level 2 Course Objectives, Session 1 Level 1 Quick Review Chapter 6 Revisit: Web Fonts Chapter 8: Adding Graphics to Web Pages Chapter 9: Sprucing Up Your Site s Navigation Begin

More information

Web Site Design and Development Lecture 5

Web Site Design and Development Lecture 5 Web Site Design and Development Lecture 5 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM CSS CSS stands for Cascading Style Sheets. These style sheets define the look and layout of your HTML elements. A

More information

CSS Web2.0 Search. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall Exam #1 graded Exam #2 rescheduled. now tentatively 11/10

CSS Web2.0 Search. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall Exam #1 graded Exam #2 rescheduled. now tentatively 11/10 Lecture 12 CSS Web2.0 Search Announcements Exam #1 graded Exam #2 rescheduled now tentatively 11/10 Project #2 due November 9th html, CSS, Javascript Styling backgrounds CSS background properties are used

More information

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 4 The Box Model Unit 20 - Client Side Customisation of Web Pages Week 2 Lesson 4 The Box Model So far Looked at what CSS is Looked at why we will use it Used CSS In-line Embedded (internal style-sheet) External

More information

CSS: The Basics CISC 282 September 20, 2014

CSS: The Basics CISC 282 September 20, 2014 CSS: The Basics CISC 282 September 20, 2014 Style Sheets System for defining a document's style Used in many contexts Desktop publishing Markup languages Cascading Style Sheets (CSS) Style sheets for HTML

More information

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen https://www.halvorsen.blog Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen History of the Web Internet (1960s) World Wide Web - WWW (1991) First Web Browser - Netscape,

More information

Chapter 4 CSS basics

Chapter 4 CSS basics Sungkyunkwan University Chapter 4 CSS basics Prepared by J. Lee and H. Choo Web Programming Copyright 2000-2018 Networking Laboratory 1/48 Copyright 2000-2012 Networking Laboratory Chapter 4 Outline 4.1

More information

Cascading Style Sheets (CSS)

Cascading Style Sheets (CSS) Cascading Style Sheets (CSS) Mendel Rosenblum 1 Driving problem behind CSS What font type and size does introduction generate? Answer: Some default from the browser (HTML tells what browser how)

More information

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

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags Recap on HTML and creating our template file Introduction

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 Web Development & Design Foundations with HTML5 KEY CONCEPTS Copyright Terry Felke-Morris 1 Learning Outcomes In this chapter, you will learn how to... Describe the evolution of style sheets from print

More information

Introduction to HTML & CSS. Instructor: Beck Johnson Week 5

Introduction to HTML & CSS. Instructor: Beck Johnson Week 5 Introduction to HTML & CSS Instructor: Beck Johnson Week 5 SESSION OVERVIEW Review float, flex, media queries CSS positioning Fun CSS tricks Introduction to JavaScript Evaluations REVIEW! CSS Floats The

More information

Adding CSS to your HTML

Adding CSS to your HTML Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,

More information

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 LEARNING OUTCOMES In this chapter, you will learn how to... Describe the evolution of style sheets from print media to the Web List

More information

New Features in mpdf v5.7

New Features in mpdf v5.7 New Features in mpdf v5.7 Table of Contents ToC Layout and styling... 1 Table of Contents styling... 1 Text-align on decimal point... 3 Automatic ToC and Bookmarks... 4 Improved line-breaking... 4 CSS

More information

Divs, Classes & IDs. Web Development

Divs, Classes & IDs. Web Development Divs, Classes & IDs Web Development Agenda Key concepts in page layout class id div 2 class Attribute While the name of an element specifies its type, the class attribute lets you assign to it one or more

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 3 CSS BASICS Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to... Describe the evolution of style sheets

More information

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

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax 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 Style Sheets can save a lot of work External Style Sheets

More information

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data. Review The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data. It is not the internet! It is a service of the internet.

More information

2005 WebGUI Users Conference

2005 WebGUI Users Conference Cascading Style Sheets 2005 WebGUI Users Conference Style Sheet Types 3 Options Inline Embedded Linked Inline Use an inline style sheet to modify a single element one time in a page.

More information

EECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling

EECS1012. Net-centric Introduction to Computing. Lecture 3: CSS for Styling EECS1012 Net-centric Introduction to Computing Lecture 3: CSS for Styling Acknowledgements Contents are adapted from web lectures for Web Programming Step by Step, by M. Stepp, J. Miller, and V. Kirst.

More information

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

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 Index Numbers & Symbols (angle brackets), in HTML, 47 : (colon), in CSS, 96 {} (curly brackets), in CSS, 75, 96. (dot), in CSS, 89, 102 # (hash mark), in CSS, 87 88, 99 % (percent) font size, in CSS,

More information

HTML and CSS a further introduction

HTML and CSS a further introduction HTML and CSS a further introduction By now you should be familiar with HTML and CSS and what they are, HTML dictates the structure of a page, CSS dictates how it looks. This tutorial will teach you a few

More information

Block & Inline Elements

Block & Inline Elements Block & Inline Elements Every tag in HTML can classified as a block or inline element. > Block elements always start on a new line (Paragraph, List items, Blockquotes, Tables) > Inline elements do not

More information

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

2. Write style rules for how you d like certain elements to look. CSS for presentation Cascading Style Sheet Orientation CSS Cascading Style Sheet is a language that allows the user to change the appearance or presentation of elements on the page: the size, style, and

More information

Lab Introduction to Cascading Style Sheets

Lab Introduction to Cascading Style Sheets Lab Introduction to Cascading Style Sheets For this laboratory you will need a basic text editor and a browser. In the labs, winedt or Notepad++ is recommended along with Firefox/Chrome For this activity,

More information

Brand identity guidelines

Brand identity guidelines Brand identity guidelines CONTENTS 1 LOGO 5 COLOUR 6 TYPEFACE 8 SIGNAGE These guidelines are to help you understand the PACIFIC ALUMINIUM visual brand. The following pages demonstrate how the PACIFIC ALUMINIUM

More information

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

CE419 Web Programming. Session 3: HTML (contd.), CSS CE419 Web Programming Session 3: HTML (contd.), CSS 1 Forms 2 Forms Provides a way to interact with users. Not useful without a server-side counterpart. 3 From Elements

More information

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2 Introduction to HTML & CSS Instructor: Beck Johnson Week 2 today Week One review and questions File organization CSS Box Model: margin and padding Background images and gradients with CSS Make a hero banner!

More information

Creating An Effective Academic Poster. ~ A Student Petersheim Workshop

Creating An Effective Academic Poster. ~ A Student Petersheim Workshop Creating An Effective Academic Poster ~ A Student Petersheim Workshop 11 Seconds Poster Graphics and Pictures Headlines and Subheadings Poster Copy PRINCIPLES OF DESIGN BALANCE Visual balance comes

More information

CSE 154 LECTURE 3: MORE CSS

CSE 154 LECTURE 3: MORE CSS CSE 154 LECTURE 3: MORE CSS Cascading Style Sheets (CSS): ... ... HTML CSS describes the appearance and layout of information

More information

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017 CSCB20 Week 7 Introduction to Database and Web Application Programming Anna Bretscher Winter 2017 Cascading Style Sheets (CSS) Examples of CSS CSS provides a powerful and stillevolving toolkit of style

More information

Module 2 (VI): CSS [Part 3]

Module 2 (VI): CSS [Part 3] INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 2 (VI): CSS [Part 3] Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals

More information

BOOTSTRAP AFFIX PLUGIN

BOOTSTRAP AFFIX PLUGIN BOOTSTRAP AFFIX PLUGIN http://www.tutorialspoint.com/bootstrap/bootstrap_affix_plugin.htm Copyright tutorialspoint.com The affix plugin allows a to become affixed to a location on the page. You can

More information

Using Dreamweaver CS6

Using Dreamweaver CS6 6 So far we have used CSS to arrange the elements on our web page. We have also used CSS for some limited formatting. In this section we will take full advantage of using CSS to format our web site. Just

More information

Connected TV Applications for TiVo. Project Jigsaw. Design Draft. 26 Feb 2013

Connected TV Applications for TiVo. Project Jigsaw. Design Draft. 26 Feb 2013 Connected TV Applications for TiVo Project Jigsaw Design Draft 26 Feb 2013 UI Design Connected TV application for TiVo Project Jigsaw 2 Overview LAUNCH POINT The goal of Project Jigsaw is to create a library

More information

APPLIED COMPUTING 1P01 Fluency with Technology

APPLIED COMPUTING 1P01 Fluency with Technology APPLIED COMPUTING 1P01 Fluency with Technology Cascading Style Sheets (CSS) APCO/IASC 1P01 Brock University Brock University (APCO/IASC 1P01) Cascading Style Sheets (CSS) 1 / 39 HTML Remember web pages?

More information

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

Session 4. Style Sheets (CSS) Reading & References.   A reference containing tables of CSS properties Session 4 Style Sheets (CSS) 1 Reading Reading & References en.wikipedia.org/wiki/css Style Sheet Tutorials www.htmldog.com/guides/cssbeginner/ A reference containing tables of CSS properties web.simmons.edu/~grabiner/comm244/weekthree/css-basic-properties.html

More information

CSc 337 LECTURE 3: CSS

CSc 337 LECTURE 3: CSS CSc 337 LECTURE 3: CSS The bad way to produce styles welcome to Greasy Joe's. You will never, ever, ever beat our

More information

Whitepaper. Call to Action

Whitepaper. Call to Action Whitepaper Call to Action The Call to Action When companies send emails, the first goal would be that subscribers open the email. The next step would be that all of them actually read the email. And the

More information

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

CSS is applied to an existing HTML web document--both working in tandem to display web pages.

CSS is applied to an existing HTML web document--both working in tandem to display web pages. CSS Intro Introduction to Cascading Style Sheets What is CSS? CSS (Cascading Style Sheets) is a supplementary extension to allowing web designers to style specific elements on their pages and throughout

More information

MichPA Content Guide. Table of Contents. Website Section Overview. Global Banner & Navigation. Content Area Client editable

MichPA Content Guide. Table of Contents. Website Section Overview. Global Banner & Navigation. Content Area Client editable Table of Contents Website Section Overview MichPA Content Guide Website Section Overview...1 FAQ...2 Content Area Styles...3 Client-side Right Navigation Styles...4 Font Index...5 Color Index...5 Rotating

More information

Introduction to Web Programming and Design

Introduction to Web Programming and Design Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited and encouraged to use this presentation to promote

More information

CSS. Lecture 16 COMPSCI 111/111G SS 2018

CSS. Lecture 16 COMPSCI 111/111G SS 2018 CSS Lecture 16 COMPSCI 111/111G SS 2018 No CSS Styles A style changes the way the HTML code is displayed Same page displayed using different styles http://csszengarden.com Same page with a style sheet

More information

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

The Benefits of CSS. Less work: Change look of the whole site with one edit 11 INTRODUCING CSS OVERVIEW The benefits of CSS Inheritance Understanding document structure Writing style rules Attaching styles to the HTML document The cascade The box model CSS units of measurement

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 3 Cascading Style Sheets (CSS) Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you

More information

RML Example 48: Paragraph flow controls

RML Example 48: Paragraph flow controls RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf. These RML samples showcase techniques and features

More information

This page presents most of typographical aspects of JA Drimia. Make your readers happy with great Typography and User Experience!

This page presents most of typographical aspects of JA Drimia. Make your readers happy with great Typography and User Experience! This page presents most of typographical aspects of JA Drimia Make your readers happy with great Typography and User Experience! This is an Heading 1 Lorem tortor Curabitur urna interdum Maecenas ut felis

More information

CSS means Cascading Style Sheets. It is used to style HTML documents.

CSS means Cascading Style Sheets. It is used to style HTML documents. CSS CSS means Cascading Style Sheets. It is used to style HTML documents. Like we mentioned in the HTML tutorial, CSS can be embedded in the HTML document but it's better, easier and neater if you style

More information