Chapter 4 CSS basics
|
|
- Judith Stephens
- 5 years ago
- Views:
Transcription
1 Sungkyunkwan University Chapter 4 CSS basics Prepared by J. Lee and H. Choo Web Programming Copyright Networking Laboratory 1/48 Copyright Networking Laboratory
2 Chapter 4 Outline 4.1 Introduction 4.2 CSS Insertion 4.3 CSS Selectors 4.4 Font Style 4.5 Text Style Web Programming Networking Laboratory 2/48
3 4.1 Introduction We will give the following three practice problems about CSS basics Exercise 1: Selectors Create the HTML document using various selectors Exercise 2: Internal Style Sheet Create the coffee shop website (internal.html) that meets requirements Exercise 3: External Style Sheet Change the coffee shop website (internal.html) to the html document (external.html) using an external style sheet (external.css) Web Programming Networking Laboratory 3/48
4 4.1 Introduction What is CSS? CSS: Cascading Style Sheets Describes the appearance and layout of a web page Composed of CSS rules, which define sets of styles If you do not have CSS, you have a very plain web page After deleting the style of document Web Programming Networking Laboratory 4/48
5 4.2 CSS Insertion We can add CSS code in any combination of three different ways Inline Style Sheet Internal Style Sheet External Style Sheet Web Programming Networking Laboratory 5/48
6 4.2 CSS Insertion Inline Style Sheet An inline style sheet is a style for each HTML element If there are two or more declarations, be sure to write; at the end ex1.html <!DOCTYPE html> <html> <head> </head> <body> <h1>this is a headline.</h1> <p style="color: blue">this is fist paragraph.</p> <p>this is second paragraph.</p> </body> </html> attribute property Web Programming Networking Laboratory 6/48
7 4.2 CSS Insertion Internal Style Sheet An internal style sheet defines CSS in HTML CSS is in <style> </style> inside a <head> element of the html ex1.html <!DOCTYPE html> <html> <head> <style> p {color: blue;} </style> </head> <body> <h1>this is a headline.</h1> <p style="color: blue"> This is fist paragraph.</p> <p> This is second paragraph.</p> </body> </html> Web Programming Networking Laboratory 7/48
8 4.2 CSS Insertion Inline Style Sheet & Internal Style Sheet Go to the link index.html <!DOCTYPE html> <html> <head> <style>.hide { display: none; }.input-bfs { max-width: 665px; width: 100%; } </style> </head> <body class= flex flex-column mx-auto style= min-height: 100vh; max-width: 1440px; box-shadow: px #e9e9ea; > </body> </html> Web Programming Networking Laboratory 8/48
9 4.2 CSS Insertion External Style Sheet (1/3) The style definitions are normally saved in external.css files ex1.html We create a new file (.css) and write our style declarations into this file We add a <link> element into HTML file, after the opening <head> tag <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> </body> </html> mystyle.css p {color: blue;} Web Programming Networking Laboratory 9/48
10 4.2 CSS Insertion External Style Sheet (2/3) Go to the link index.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href=" /> envoy.css.btn-primary { color: #FFFFFF; background-color: #EF3934; // border-radius: 6px; box-shadow: px 0 rgba(239, 57, 52, 0.2); } Web Programming Networking Laboratory 10/48
11 4.2 CSS Insertion External Style Sheet (3/3) The real power of using an external style sheet is that multiple web pages on our site can link to the same style sheet By editing the external style sheet, we can make site-wide changes (even to hundreds of pages) instantly Changing an external style sheet affects all HTML documents Web Programming Networking Laboratory 11/48
12 4.2 CSS Insertion Multi Style Sheet Which styles will be used if the external, internal, and inline styles are different for one element? All style sheets are merged into one virtual style by the following rules: High priority 1 Web browser default value 2 External style sheet 3 Internal style sheet stored in head section 4 Inline style sheet It is convenient to define commonly used styles in the style of the <body> Web Programming Networking Laboratory 12/48
13 4.3 CSS Selectors CSS Syntax (1/2) A CSS syntax is made up of three parts: selector : specifies the HTML element you want to style property: the name of the CSS style value: the value for the CSS style Saved in a filename.css file Web Programming Networking Laboratory 13/48
14 4.3 CSS Selectors CSS Syntax (2/2) Web Programming Networking Laboratory 14/48
15 4.3 CSS Selectors CSS selectors are used to "find" (or select) HTML elements There are about 6 things that are used the most Type selector Universal selector Pseudo-class Attribute selector ID selector Class selector Web Programming Networking Laboratory 15/48
16 4.3 CSS Selectors Type Selector Type Selector selects elements based on the HTML element name mystyle.css h1{color: blue;} ex2.html Select all h1 elements <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <h1>this is a headline.</h1> <p>this is fist paragraph.</p> <p>this is second paragraph.</p> </body> </html> Web Programming Networking Laboratory 16/48
17 4.3 CSS Selectors Universal Selector Universal selector selects all elements in the page mystyle.css *{color: blue;} ex2.html Select all elements <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <h1>this is a headline.</h1> <p>this is fist paragraph.</p> <p>this is second paragraph.</p> </body> </html> Web Programming Networking Laboratory 17/48
18 4.3 CSS Selectors Pseudo-element The pseudo-element is used to style specified parts of an element ::first-line : add a special style to the first line of a text ::first-letter : add a special style to the first letter of a text mystyle.css selector::pseudo-element{ property: value; } h1::first-line{color: green;} p::first-letter{color: blue;} Web Programming Networking Laboratory 18/48
19 4.3 CSS Selectors Pseudo-class The pseudo-class will only define a particular state of that selector :link : apply to link before it s visited :visited : apply to link after it s visited :hover : apply to link while mouse pointer is over it :active : apply while left mouse button is held down on link mystyle.css selector:pseudo-calss{ property: value; } h1:hover{color: green;} p::first-letter{color: blue;} Web Programming Networking Laboratory 19/48
20 Sample web page (1/2) Go to the link Web Programming Networking Laboratory 20/48
21 Sample web page (2/2) style.css index.html Web Programming Networking Laboratory 21/48
22 4.3 CSS Selectors Attribute Selector (1/2) The attribute selector selects an element with a specific attribute mystyle.css [type]{color: blue;} ex2.html Select element with a specified attribute <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <h1>this is a headline.</h1> <p>this is fist paragraph.</p> <p>this is second paragraph.</p> <input type="date" name="date"> </body> </html> Web Programming Networking Laboratory 22/48
23 4.3 CSS Selectors Attribute Selector (2/2) The attribute selector selects an element with a specific attribute [attr = val]: element with a specified attribute and value [attr = val]: element with a specified attribute starting with the specified value [attr ~ = val]: element with an attribute value containing a specified word [attr ^ = val]: element whose attribute value begins with a specified value (The value does not have to be a whole word) [attr $ = val]: element whose attribute value ends with a specified value [attr * = val]: element whose attribute value contains a specified value Web Programming Networking Laboratory 23/48
24 4.3 CSS Selectors ID Selector ID selector uses the id attribute to select a specific HTML element mystyle.css #basic{color: blue;} ex3.html Select the element whose id is basic <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> Specify the id of the <h1> element as basic" <body> <h1 id="basic">css Basics</h1> <h2>css Insertions</h2> <h3>css Selectors</h3> </body> </html> Web Programming Networking Laboratory 24/48
25 4.3 CSS Selectors Class Selector Class selector selects elements with a specific class attribute mystyle.css.basic{color: blue;} ex3.html Select the element whose class is basic <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> Specify the class of the <h1>, <h2> element as basic" <body> <h1 class="basic">css Basics</h1> <h2 class="basic">css Insertions</h2> <h3>css Selectors</h3> </body> </html> Web Programming Networking Laboratory 25/48
26 4.3 CSS Selectors Descendant Selector These combine selectors to select specific elements selector1 selector2 : descendant relationship mystyle.css div p{color: blue;} ex4.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <div><p>descendant relationship</p> <span><p>child relationship</p></span> </div> </body> </html> Web Programming Networking Laboratory 26/48
27 4.3 CSS Selectors Child Selector These combine selectors to select specific elements selector1 > selector2 : child relationship mystyle.css div > p{color: blue;} ex4.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <div><p>descendant relationship</p> <span><p>child relationship</p></span> </div> </body> </html> Web Programming Networking Laboratory 27/48
28 4.3 CSS Selectors Adjacent Sibling Selector These combine selectors to select specific elements selector1 + selector2 : adjacent sibling relationship mystyle.css div + p{color: blue;} ex4.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <div><p>descendant relationship</p> <span><p>child relationship</p></span> </div> <p>adjacent sibling relationship</p> </body> </html> Web Programming Networking Laboratory 28/48
29 4.3 CSS Selectors General Sibling Selector These combine selectors to select specific elements selector1 ~ selector2 : general sibling relationship mystyle.css div ~ p{color: blue;} ex4.html <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <div><p>descendant relationship</p> <span><p>child relationship</p></span> </div> <p>adjacent sibling relationship</p> <p>general sibling relationship</p> </body> </html> Web Programming Networking Laboratory 29/48
30 4.3 CSS Selectors Selector Group To group selectors, the selectors are separated by a comma This is called the selector group h1, h2, h3 { font-family: sans-serif; } Select the <h1>, <h2>, and <h3> elements Web Programming Networking Laboratory 30/48
31 4.4 Font Style The font property allows to specify the font type, color, size, etc font-size font-family font-style : font size setting : font family setting\ : font style setting font-weight : bold setting CSS usage on the web platform Web Programming Networking Laboratory 31/48
32 4.4 Font Style Font Size (1/2) The units of font that can be set are as follows: Absolute lengths pt - points px - pixels Relative lengths em - relative to the font-size of the element (scale factor) rem - relative to font-size of the root element (scale factor) Percent Absolute size keyword xx-small, x-small, small, medium (initial value), large, x-large, xx-large Relative size keyword smaller, larger This website enables you to easily convert pixels to ems: Web Programming Networking Laboratory 32/48
33 4.4 Font Style Font Size (2/2) The em and rem units are practical in creating perfectly scalable layout! <!DOCTYPE html> <html> <head> <style> #px{font-size:16px;} #rem{font-size:1em;} </style> </head> <body> <div id="px">px</div> <div id="rem">rem</div> </body> </html> Web Programming Networking Laboratory 33/48
34 4.4 Font Style Font Family (1/2) We can specify multiple fonts from highest to lowest priority If the first font is not found on the user's computer, the next is tried Generic font names: Most Favorite p { font-family: Garamond, "Times New Roman", serif;} sans-serif, serif, monospace Least Favorite Web Programming Networking Laboratory 34/48
35 4.4 Font Style Font Family (2/2) Go to the link common.css body{ font-family: 나눔고딕, NanumGothic, ng, 돋움, arial, helvetica, sans-serif!important; font-size:12px; line-height:19px; color:#6f6f6f;} Web Programming Networking Laboratory 35/48
36 4.4 Font Style Web Font Web font is a technique for storing fonts on a web server and then transferring them directly to a user's web browser when needed Go to the link <!DOCTYPE html> <html> <head> <link href=" rel="stylesheet"> </head> <body> <p style="font-family: 'Notable', sans-serif"> This is web font.</p> </body> </html> Web Programming Networking Laboratory 36/48
37 4.4 Font Style Font Style and Font Weight The font-style determines whether the font should be italicized text, and can be set to one of normal, italic, or oblique The font-weight determines whether the font is bold and can be set to bold or normal Web Programming Networking Laboratory 37/48
38 4.4 Font Style Font Shorthand The font shorthand technique can set various attributes of a font in one line {font: italic bold 12pt Helvetica,sans-serif} {font-style: italic; font-variant: normal; font-weight: bold; Initial values used if no value specified in font font-size: 12pt; property list (that is, potentially reset) line-height: normal; font-family: Helvetica,sans-serif} Web Programming Networking Laboratory 38/48
39 4.5 Text Style There are over 500 CSS properties! Here are a few: color direction letter-spacing line-height text-align text-decoration text-indent text-shadow text-transform : color setting : writing direction setting (Horizontal, Vertical) : spacing between text setting : height of the text line setting : horizontal alignment setting : decoration setting : indent setting : shadow effect setting : case conversion setting Web Programming Networking Laboratory 39/48
40 4.5 Text Style Color (1/2) Generally prefer more descriptive over less: Color name W3C has listed 16 color names that will validate <!DOCTYPE html> <html> <head> </head> <body> <h1 style="color:tomato">tomato</h1> <h1 style="color:powderblue">powderblue</h1> <h1 style="color:mediumpurple">mediumpurple </h1> </body> </html> Web Programming Networking Laboratory 40/48
41 4.5 Text Style Color (2/2) RGB A percent or an integer between Hexadecimal code Red, Green, and Blue - each from 00 - FF #eeddff = #edf color: rgb(60%, 40%, 10%); color: rgb(153, 102, 25); color: #ff0000; (= #f00) red green blue Web Programming Networking Laboratory 41/48
42 4.5 Text Style Text Alignment The text-align can be left, center, right, or justify Go to the link style.css.header ul.navigation li { height: 45px; display: block; text-align: right; padding: 0 49px 0 0; } index.html <!DOCTYPE html> <html> <head> </head> <body> <h3 style="text-align: center"> Call for Papers </h3> Web Programming Networking Laboratory 42/48
43 4.5 Text Style Text Decoration The text-decoration can also be overline, line-through, or underline Go to the link index.html <a style="color: inherit; text-decoration:underline;"...> 스페셜기프트안내 </a> Web Programming Networking Laboratory 43/48
44 4.5 Text Style Text Transform The text-transform is used to specify lowercase or uppercase characters p.upper {text-transform : uppercase;} p.lower {text-transform : lowercase;} p.capit {text-transform : capitalize;} <p class="upper">text_transform is uppercase.</p> <p class="lower">text_transform is lowercase.</p> <p class="capit">text_transform is capitalize.</p> Web Programming Networking Laboratory 44/48
45 4.5 Text Style Text Shadow The text-shadow can set the shadow of the text text-shadow: xposition yposition blursize color; xposition is the horizontal position of the text shadow relative to the text yposition is the vertical position of the text shadow relative to the text BlurSize is the size of the shadows blur Color is the color value hex, rgb, rgba, or named color h1 { } text-shadow: 30px 10px 0px #aaa; <h1>text shadow</h1> Web Programming Networking Laboratory 45/48
46 4.5 Text Style Word Wrapping The word-warp automatically truncates a word if it is too long to fit in the domain and pass it to the next line word-wrap : normal break-word initial inherit; Normal: breaks words only at allowed break points break-word: allows unbreakable words to be broken initial: sets this property to its default value Inherit: inherits this property from its parent element p.test { } word-wrap: break-word; <p class="test"> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p> aaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa Web Programming Networking Laboratory 46/48
47 4.5 Text Style Multi Column The multi columns are used to lay out text and use the following attributes column-count: the number of columns column-gap: the gap between the columns column-width: a width for the columns column-rule: all the column-rule-* properties column-span: specifies how many columns should span across none: the element does not span across multiple columns all: the element should span across all columns h3 { column-span: all; } <h3>this heading spans across all three columns</h3> column-span : none all; Web Programming Networking Laboratory 47/48
48 Sungkyunkwan University Thanks Prepared by J. Lee and H. Choo Web Programming Copyright Copyright Networking Networking Laboratory 48/48
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 information8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)
Web Development & Design Foundations with HTML5 Ninth Edition Chapter 3 Configuring Color and Text with CSS Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of links
More informationCSS. 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 informationINFORMATICA 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 informationSession 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 informationCOSC 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 informationReview 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 informationCSS Selectors. element selectors. .class selectors. #id selectors
CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors
More informationWeb 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 informationWeb 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 informationWeb Site Design and Development Lecture 6
Web Site Design and Development Lecture 6 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Inheritance Before we talk about font properties, it needs to be known that font properties are inherited by the descendants
More informationIntroduction 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 informationAdding 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 informationCSS 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 informationHTML/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 informationThe building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).
WDI Fundamentals Unit 4 CSS Cheat Sheet Rule The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations). Declaration A declaration is made
More informationAppendix 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 informationCascading Style Sheets
4 TVEZEWXYHMNR LSTVSKVEQY-RJSVQEXMOENITSHTSVSZ RETVSNIOXIQ RERGSZER Q^)ZVSTWO LSWSGM PR LSJSRHYEVS^TS XYLPEZR LSQ WXE4VEL] 4VELE)9-RZIWXYNIQIHSZE% FYHSYGRSWXM CSS Cascading Style Sheets Lukáš Bařinka barinkl@fel.cvut.cz
More informationBIM222 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 informationWelcome 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 informationCMPT 165: More CSS Basics
CMPT 165: More CSS Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 14, 2011 1 The Favorites Icon The favorites icon (favicon) is the small icon you see
More informationHTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web
HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What
More information3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets
3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers
More information- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations
3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS2.1 reflects browser implementations - CSS3 is partially finished and parts are implemented in current browsers
More informationCSS. 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 informationZen Garden. CSS Zen Garden
CSS Patrick Behr CSS HTML = content CSS = display It s important to keep them separated Less code in your HTML Easy maintenance Allows for different mediums Desktop Mobile Print Braille Zen Garden CSS
More informationCascading 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 informationCSc 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 informationCreating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color
Notes Week 3 By: Marisa Stoolmiller CSS Color Values With CSS, colors can be specified in different ways: Color names Hexadecimal values RGB values HSL values (CSS3) HWB values (CSS4) Hexadecimal Colors
More informationComp-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 informationCSS Lecture 16 COMPSCI 111/111G SS 2018
No CSS CSS Lecture 16 COMPSCI 111/111G SS 2018 Styles Astyle changes the way the HTML code is displayed Same page displayed using different styles Same page with a style sheet body font-family: sans-serif;
More informationSession 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 informationCSS: Cascading Style Sheets
What are Style Sheets CSS: Cascading Style Sheets Representation and Management of Data on the Internet, CS Department, Hebrew University, 2007 A style sheet is a mechanism that allows to specify how HTML
More informationIntroduction 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 informationIntroduction 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 informationCSS 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 informationReading 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 informationWEB 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 information8a. Cascading Style Sheet
INFS 2150 Introduction to Web Development 8a. Cascading Style Sheet 1 Objectives Concepts of cascading style sheets (CSS). 3 ways of using CSS: inline styles, embedded styles, and external style sheet.
More informationEECS1012. 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 informationCMPT 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 informationLecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)
Lecture 10 CSS Properties Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Summary of the previous lecture CSS basics CSS writing option CSS rules Id,s and Classes 2 Outline Font properties
More informationCSC 443: Web Programming
1 CSC 443: Web Programming Haidar Harmanani Department of Computer Science and Mathematics Lebanese American University Byblos, 1401 2010 Lebanon CSC443: Web Programming 2 for Styling The good, the bad
More informationACSC 231 Internet Technologies
ACSC 231 Internet Technologies Lecture 7 Web Typography Efthyvoulos Kyriacou - Assoc. Prof. Frederick University Resources: C. Markides (Frederick University) Slide 1 ACSC 231: Internet Technologies 23/12/2008
More informationAssignments (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 informationCSE 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 informationChapter 2 CSS for Style
Chapter 2 CSS for Style CSS, or Cascading Style Sheets, is a language used to define the presentation of a document written in mark up language, such as HTML. The main purpose of CSS is to separate the
More informationCSS Styles Quick Reference Guide
Table 1: CSS Font and Text Properties Font & Text Properties Example(s) font-family Font or typeface font-family: Tahoma font-size Size of the font font-size: 12pt font-weight Normal or bold font-weight:
More informationCascading 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 informationThe 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 informationClient-Side Web Technologies. CSS Part I
Client-Side Web Technologies CSS Part I Topics Style declarations Style sources Selectors Selector specificity The cascade and inheritance Values and units CSS Cascading Style Sheets CSS specifies the
More informationCSC309 Programming on the Web week 3: css, rwd
CSC309 Programming on the Web week 3: css, rwd Amir H. Chinaei, Spring 2017 Office Hours: M 3:45-5:45 BA4222 ahchinaei@cs.toronto.edu http://www.cs.toronto.edu/~ahchinaei/ survey 1 in survey 1, you provide
More informationStudy 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 informationCSS: 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 informationGoSquared Equally Rounded Corners Equally Rounded Corners -webkit-border-radius -moz-border-radius border-radius Box Shadow Box Shadow -webkit-box-shadow x-offset, y-offset, blur, color Webkit Firefox
More informationCSS for Styling CS380
1 CSS for Styling The good, the bad and the 2 ugly! shashdot. News for nerds!! You will never, ever be bored here!
More informationCascade Stylesheets (CSS)
Previous versions: David Benavides and Amador Durán Toro (noviembre 2006) Last revision: Manuel Resinas (october 2007) Tiempo: 2h escuela técnica superior de ingeniería informática Departamento de Lenguajes
More informationCSS. Shan-Hung Wu CS, NTHU
CSS Shan-Hung Wu CS, NTHU CSS Zen Garden 2 Outline The Basics Selectors Layout Stacking Order 3 Outline The Basics Selectors Layout Stacking Order 4 Grammar selector { property: value; 5 Example /* for
More informationCSCB20 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 informationCSS 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 informationCSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson
CSS: Formatting Text Robert A. Fulkerson College of Information Science and Technology http://www.ist.unomaha.edu/ University of Nebraska at Omaha http://www.unomaha.edu/ CSS for text processing: font-family
More information- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents
3.1 Introduction - The CSS1 specification was developed in 1996 - CSS2 was released in 1998 - CSS3 is on its way - CSSs provide the means to control and change presentation of HTML documents - CSS is not
More informationCHAPTER 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 informationHTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources
HTML + CSS ScottyLabs WDW OVERVIEW What are HTML and CSS? How can I use them? WHAT ARE HTML AND CSS? HTML - HyperText Markup Language Specifies webpage content hierarchy Describes rough layout of content
More informationCASCADING STYLESHEETS
CASCADING STYLESHEETS Cascading StyleSheets (CSS) has been mainly created because HTML is just not the right tool for precision and flexibility. HTML is not a very effective for designing web pages. Most
More informationCSS3 Basics. From & CSS Visual Dictionary Learning Curve Books, LLC
CSS3 Basics From www.w3schools.com & CSS Visual Dictionary Learning Curve Books, LLC CSS Box Model Margin (top, right, bottom, left) Shorthand property, equivalent to Border-width border-style border-color
More informationCSS THE M\SS1NG MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo
CSS THE M\SS1NG MANUAL David Sawyer McFarland POGUE PRESS" O'REILLr Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo Table of Contents The Missing Credits Introduction xiii I Part One: CSS
More informationCreating 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 informationIMY 110 Theme 6 Cascading Style Sheets
IMY 110 Theme 6 Cascading Style Sheets 1. Cascading Style Sheets 1.1. Cascading Style Sheets Up to now we have done styling by using the style attribute. e.g. paragraph What
More informationTutorial 3: Working with Cascading Style Sheets
Tutorial 3: Working with Cascading Style Sheets College of Computing & Information Technology King Abdulaziz University CPCS-665 Internet Technology Objectives Review the history and concepts of CSS Explore
More informationCSS: 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 informationAnatomy of a Style. Cascaded Style Sheets - CSS. CSS Presentation Description Language. Measurement Specification
CSS Presentation Description Language HTML3:(Hyper Text Markup Language) 1990 Interpreted Language by Web Browser Describes both the structure and format of document XHTML and HTML5 Extensible Hyper Text
More informationChapter 12: FORMATTING TEXT
Disclaimer: All words, pictures are adopted from Learning Web Design (3 rd eds.) by Jennifer Niederst Robbins, published by O Reilly 2007. PART III: CSS FOR PRESENTATION Chapter 12: FORMATTING TEXT CSc2320
More informationID1354 Internet Applications
ID1354 Internet Applications CSS Leif Lindbäck, Nima Dokoohaki leifl@kth.se, nimad@kth.se SCS/ICT/KTH What is CSS? - Cascading Style Sheets, CSS provide the means to control and change presentation of
More informationIDM 221. Web Design I. IDM 221: Web Authoring I 1
IDM 221 Web Design I IDM 221: Web Authoring I 1 Week 5 IDM 221: Web Authoring I 2 Working With Text IDM 221: Web Authoring I 3 Special Characters IDM 221: Web Authoring I 4 > < & IDM 221: Web Authoring
More informationFundamentals of Web Programming a
Fundamentals of Web Programming a Cascading Style Sheets Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science a Copyright 2009 Teodor Rus. These slides have been developed
More information3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets
3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification
More informationMake 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 informationIntroduction to Web Tech and Programming
Introduction to Web Tech and Programming Cascading Style Sheets Designed to facilitate separation of content and presentation from a document Allows easy modification of style for an entire page or an
More informationCascading Style Sheets. Overview and Basic use of CSS
Cascading Style Sheets Overview and Basic use of CSS What are Style Sheets? A World Wide Web Consortium (W3C) defined standard A way for web page designers to separate the formatting of a document from
More informationINTRODUCTION TO CSS. Mohammad Jawad Kadhim
INTRODUCTION TO CSS Mohammad Jawad Kadhim WHAT IS CSS Like HTML, CSS is an interpreted language. When a web page request is processed by a web server, the server s response can include style sheets,
More informationWeb Information System Design No.4 Put Style to Web Documents. Tatsuya Hagino
Web Information System Design No.4 Put Style to Web Documents Tatsuya Hagino (hagino@sfc.keio.ac.jp) 1 Web Page Components Combine orthogonal technologies content style programming style JavaScript Programming
More informationTo link to an external stylesheet, the link element is placed within the head of the html page:
CSS Basics An external style sheet is simply a text file (use BBEdit or Textwrangler) containing style rules, saved with the.css extension. It s best practice to keep style sheets for a site grouped within
More informationParashar Technologies HTML Lecture Notes-4
CSS Links Links can be styled in different ways. HTML Lecture Notes-4 Styling Links Links can be styled with any CSS property (e.g. color, font-family, background, etc.). a { color: #FF0000; In addition,
More informationChapter 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 informationCSS. Text & Font Properties. Copyright DevelopIntelligence LLC
CSS Text & Font Properties 1 text-indent - sets amount of indentation for first line of text value: length measurement inherit default: 0 applies to: block-level elements and table cells inherits: yes
More informationLBS Polytechnic. Hey! Make With The Style Sheet Already, Bub!
When you're all done, the format will look like this: Hey! Make With The Style Sheet Already, Bub! This
More information- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values
3.1 Introduction - HTML is primarily concerned with content, rather than style - However, tags have presentation properties, for which browsers have default values - The CSS1 cascading style sheet specification
More informationIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets Welcome to the CSS workshop! Before you begin this workshop you should have some basic understanding of HTML and building web pages. What is CSS anyway and what will
More informationTable of Contents Chapter 9. Working with Cascading Style Sheets ... 1
Table of Contents Chapter 9.... 1 Introduction... 1 Introducing Cascading Style Sheets... 2 Create CSS Styles... 2 Attribute Styles... 2 Style Types... 3 Creating a Web Page with a CSS Layout... 4 Create
More informationCSS. Selectors & Measurments. Copyright DevelopIntelligence LLC
CSS Selectors & Measurments 1 Back to descendants remember walking down the document tree structure and see how parents and children interact not only is it important to know about inheritance walking
More informationUnveiling 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 informationWeb 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 informationWhat 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 informationWeb Design and Development Tutorial 03
Table of Contents Web Design & Development - Tutorial 03... 2 Using and Applying CSS to XHTML... 2 Conventions... 2 What you need for this tutorial... 2 Common Terminology... 3 Parent / Child Elements...
More information2005 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 informationNetworks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS. 8 Oct 2015
Networks and Web for Health Informatics (HINF 6220) Tutorial 8 : CSS 8 Oct 2015 What is CSS? o CSS (Style Sheet) defines how HTML elements are formatted and displayed. o It helps you easily change an HTML
More informationWeb Engineering CSS. By Assistant Prof Malik M Ali
Web Engineering CSS By Assistant Prof Malik M Ali Overview of CSS CSS : Cascading Style Sheet a style is a formatting rule. That rule can be applied to an individual tag element, to all instances of a
More informationIndex. 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 informationUNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013
UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 SUBJECT CODE : SCSV1223 (Section 05) SUBJECT NAME : WEB PROGRAMMING YEAR/COURSE : 1SCSV TIME : 2.00 4.00 PM DATE : 18 APRIL 2013 VENUE : KPU 10
More information