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

Similar documents
CSS: The Basics CISC 282 September 20, 2014

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

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

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

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

CSS Cascading Style Sheets

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Color. How to specify colors Color terminology and contrast Background color

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

Appendix D CSS Properties and Values

COSC 2206 Internet Tools. CSS Cascading Style Sheets

CSS: Formatting Text. CSS for text processing: font-family. Robert A. Fulkerson

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

CSS. Lecture 16 COMPSCI 111/111G SS 2018

CSS.

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

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

CSS Lecture 16 COMPSCI 111/111G SS 2018

CSS Selectors. element selectors. .class selectors. #id selectors

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

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

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

ICT IGCSE Practical Revision Presentation Web Authoring

Introduction to Web Tech and Programming

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Introduction to WEB PROGRAMMING

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

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

ITNP43: HTML Lecture 4

CSS Cascading Style Sheets

Chapter 12: FORMATTING TEXT

CSc 337 LECTURE 3: CSS

Controlling Appearance the Old Way

Web Development & Design Foundations with HTML5

Web Site Design and Development Lecture 6

Zen Garden. CSS Zen Garden

Html basics Course Outline

Web Development & Design Foundations with HTML5

Cascading Style Sheets (CSS)

HTML/XML. HTML Continued Introduction to CSS

CSS. Text & Font Properties. Copyright DevelopIntelligence LLC

Programmazione Web a.a. 2017/2018 HTML5

Reading 2.2 Cascading Style Sheets

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

CSS for Styling CS380

Using Dreamweaver CS6

CSS: Cascading Style Sheets

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

HTML and CSS COURSE SYLLABUS

Assignments (4) Assessment as per Schedule (2)

Deccansoft Software Services

Client-Side Web Technologies. CSS Part I

CSS Styles Quick Reference Guide

Web Site Design and Development Lecture 5

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

CSE 154 LECTURE 3: MORE CSS

Cascading Style Sheets. Overview and Basic use of CSS

Cascade Stylesheets (CSS)

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

Data Visualization (CIS/DSC 468)

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

IDM 221. Web Design I. IDM 221: Web Authoring I 1

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

Data Visualization (DSC 530/CIS )

CMPT 165: More CSS Basics

DAY 4. Coding External Style Sheets

CSS: Cascading Style Sheets

Final Exam Study Guide

Cascading Style Sheets Level 2

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

ICT IGCSE Practical Revision Presentation Web Authoring

Index. CSS directive, # (octothorpe), intrapage links, 26

IDM 221. Web Design I. IDM 221: Web Authoring I 1

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

CSC 443: Web Programming

Admin. Midterm 1 on. Oct. 13 th (2 weeks from today) Coursework:

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

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

HTML TUTORIAL ONE. Understanding What XHTML is Not

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

Lab Introduction to Cascading Style Sheets

APPLIED COMPUTING 1P01 Fluency with Technology

Introduction to CSS. Fijihosting.com Introduction to CSS page 1. What are style sheets? Lovely! How do I use them?

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

Web Design and Implementation

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS

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

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube {

CASCADING STYLESHEETS

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

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

Fundamentals of Web Programming a

ID1354 Internet Applications

Block & Inline Elements

Transcription:

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 Due: Tuesday, February 7 th,. Your HTML files must be on your people.rit.edu website as specified below. Chapter 6 - Tables HTML tables are handy for displaying information in a grid, for example sports results, stock reports, airline timetables, or other data that is typically represented in a spreadsheet. 1) What do the following table elements represent? <table> Used to create a table <tr> A table's row <td> A table's cell <th> A table's header 2) Re-create the following table structure in HTML (don t worry about the borders) 3) Re-create the following table structure in HTML - be sure to utilize the <th> tag (don t worry about the borders)! 1

4) Go ahead and read about spanning columns and spanning rows and experiment with them if you like. We ll be covering this in class. No answer required. 5) What are the three tags used for Long Tables that help distinguish between the main content of the table, and the top and bottom of the table? <thead> The headings of table should be inside this element. <tbody> The body should be inside this element. <tfoot> The footer should be inside this element. 6) Go ahead and read about width & spacing and border & background. We ll be covering newer ways to do this (using CSS) in class. No answer required. Look over the example HTML and summary of the chapter.! 2

Chapter 8 - Extra Markup This chapter is a grab bag of topics - let s go! 1) There have been several version of HTML created since the early days of the web: HTML (1991-1993) HTML 2 (1995) HTML 3 (January of 1997) HTML 4 (November of 1997) - Name three HTML 4 elements have been supplanted by CSS <center>, <font>, <strike> XHTML 1.0 (2000) - Give three of the more strict HTML rules that were added to HTML 1) Every element needed a closing tag (except for empty elements such as <img/>. 2) Attribute names had to be in lowercase. 3) All attributes required a value, and all values were to be placed in double quotes. HTML5 (December 2012) HTML5 isn t just about new tags, it s about new capabilities like audio, video, location awareness and the ability to to turn a web page into an application. We ll be covering some of these capabilities later in the course. - Give the DOCTYPE declaration for HTML5 <!doctype html> 2) What is the markup used for creating HTML comments that cannot be seen by the end user (unless they view source ). Write a sample HTML comment. <!-- Insert your content here --> 3) The global id attribute can be used to identify a unique element on a page. This is handy when using CSS selectors, and very handy when using JavaScript to program a page. Give an example of an HTML element with an id attribute below: <p id="pullquote"> 4) The global class attribute can be used to identify a group (or class) of elements on a page. This is handy when using CSS selectors. Give an example of an HTML element with a class attribute below:! 3

<p class = important"> 5) Elements that always appear to start a new line in the browser window are called: Block elements Examples: <h1>, <p>, <ul>, <li> 6) Elements that always appear to continue on the same line in the browser window are called: Inline elements Examples: <a>, <b>, <em>, <img> 7) Name a generic block-level element that allows you to group together a set of elements in one block-level box: <div> 8) Name a generic inline-level element that allows you to group together a set of inline elements or just a section of text: <span> 9) Which tag is used to display a small window on a web page (these are commonly used with advertising)? <iframe> Use with: <src>, <height>, <width>, <frameborder>, <seamless> 10) Which tag is used to store metadata for a web page that users won t directly see (this data is commonly inserted by web page authoring tools, it can also be used to communicate with the browser or with search engines). <meta> 11) HTML entity references (or escape characters) allow you to display special characters outside of the ordinary a-z, 0-9 range. - what is the entity for < (the less than sign) &lt, &#60 - what is the entity for > (the greater than sign) &gt, &amp! 4

- what is the entity for (the copyright symbol) &copy, &#169 - what is the entity for and (left double quotes and right double quotes) left quotes &ldquo, &#8220 right quotes &rdquo, &#8221! 5

Chapter 10 - Introducing CSS (many new concepts in this chapter!) Introducing the CSS Box Model - CSS allows you to create rules that control the way that each individual box (and the contents of that box) is presented. 1) CSS selectors indicate the same rule can apply to more than one element if you separate the element names with commas. 2) CSS declarations indicate how the elements referred to in the selector should be styled. 3) CSS declarations consist of 2 parts: property and value. 4) Write a CSS rule that makes all of the p elements on the page be red in color. p { color: red; } 5) External CSS uses the <link> tag to connect to an external stylesheet. An external stylesheet contains only CSS rules (no HTML tags) Write an example <link> tag to connect to a stylesheet named styles.css Don t forget about the href, type, and rel attributes. They are all required or the stylesheet linkage won t work. <link href="styles.css" type="text/css" rel="stylesheet" /> 6) What is the name of the tag where Internal CSS is declared? <style> 7) When building a multi-page website, should you put most of your style rules in Internal CSS or External CSS? Why? External: All of the web pages can share the same style sheet, and will load much faster. :)! 6

8) CSS selectors allow you to precisely target the elements you want to style. On page 238 there are 8 selectors listed. We ll just talk about the first four today. Go ahead and fill in the meaning and an example of each. Selector Meaning Example Universal Selector Applies to all elements in the document {} Targets all elements on the page Type Selector Matches element names h1, h2, h3 {} Targets the h1, h2 and h3 elements Class Selector Matches an element whose class attribute.note {} Targets any has a value that matches the one specified element whose class after the period or full stop attribute has a value of note p.note {} Targets only p elements whose class attribute has a value of note ID Selector Matches an element whose id attribute has a introduction {}Targets value that matches the one specified after the element whose id the pound or hash symbol attribute has a value of introduction 9) Write a CSS style rule that makes an element of id= footer have a gray background. introduction{ } background-color: gray; 10) CSS Cascade. When 2 or more rules apply to the same element, there are rules that determine which style takes precedence. Define them: Last Rule: If the two selectors are identical, the latter of the two will take precedence. Here you can see the second i selector takes precedence over the first.! 7

Specificity: If one selector is more specific than the others, the more specific rule will take precedence over more general ones. 11) Inheritance - certain style rules (but not all) are inherited from parent elements by their children. For example, the em tag below is a child of the p element. <p>i m having a <em>great</em> day!</p> p{ } color: green; border: 1px solid black; A) Does the <em>great</em> element inherit the color green? Yes B) Does the <em>great</em> element inherit the black border? Yes! 8

Chapter 11 - Color The purpose of color on your site is to bring it to life, and help convey mood and evoke reactions. 1) RGB Values - Values for red, green, and blue are expressed as numbers between 0-256 2) Hex Codes - Hex values represent values for red, green, and blue as These are six-digit codes preceded by a pound or hash # sign 3) Color Names - Colors are represented by 147 predefined color names 4) Hue - Hue is near to the colloquial idea of color. 5) Saturation - Saturation refers to the amount of gray in a color 6) Brightness - Brightness (or value ) refers to how much black is in a color. 7) Contrast - It is important that there is enough contrast between foreground and background colors for the text to be legible. A) Too little contrast makes text harder to read B) Too much contrast on long spans of text that people will read a lot of can be hard to read as well What does the author propose as a solution? If text is reversed out (a light color on a dark background), you can increase the height between lines and the weight of the font to make it easier to read. 8) CSS opacity - what is the range of values for the CSS opacity property? The value is a number between 0.0 and 1.0 9) In rgba, write an example of a red color that is 50% opaque:! 9

p { background-color: red; opacity : 0.5; } 10) CSS3 HSL colors A) What does hsl stand for? hue, saturation, and lightness values B) What does hsla stand for? hue, saturation, lightness, and alpha values 11) Name that color. Head to http://www.w3schools.com/colors/colors_names.asp and get the color name, hex code, and RGB for the following colors: (click on the hex code to get the RGB values). Color name Hex code RGB value red #ff0000 rgb(255, 0, 0) green #008000 rgb(0, 128, 0) blue #0000ff rgb(0, 0, 255) black #000000 rgb(0, 0, 0) white #ffffff rgb(255, 255, 255) gray #808080 rgb(128, 128, 128) MediumSeaGreen #3cb371 rgb(60, 179, 113) 12) Take a look at the Chapter 11 example - it s online at: http://htmlandcssbook.com/code-samples/chapter-11/example.html (no answer required)! 10

Chapter 12 - Text 1) Give 3 font weights light, medium, bold 2) Give 3 font styles normal, italic, oblique 3) Give 3 values for Stretch condensed, regular, extended 4) Define and give an example for each type of font: Serif have extra details on the ends of the main strokes of the letters. These details are known as serifs. Georgia Sans-serif fonts have straight ends to letters, and therefore have a much cleaner design. Arial Monospace has every letter in a monospace (or fixed-width) font is the same width. Courier Cursive fonts either have joining strokes or other cursive characteristics, such as handwriting styles. Comic Sans Fantasy (decorative) are usually decorative fonts and are often used for titles. They're not designed for long bodies of text. Impact 5) (page 273) font-family is used to specify fonts. Write a CSS rule that will make all of the h1 and h2 tags on a page have a font-family of tahoma.! 11

h1, h2 { } font-family: tahoma 6) (page 274) What are the three most common font-size units of measurement? Write an example of each below: pixels: 20px percentages: 75% em: 3em 7) (page 277-278) We will cover how to use @font-face to embed fonts on our web pages. There is a very handy service here: http://www.google.com/fonts that we will use in class. (no answer required) 8) Give at least 1 valid value for each text related CSS property below: font-weight: bold font-style: normal text-transform: uppercase text-decoration: underline line-height: 1.4em letter-spacing: 0.2em word-spacing: 1em text-align: center vertical-align: baseline! 12

text-indent: -9999px text-shadow: 2px 2px 7px #111111 :first-letter: 200% :first-line: bold 9) (page 290) Read the page about styling links A) what does :link do? This allows you to set styles for links that have not yet been visited. B) what does :visited do? This allows you to set styles for links that have been clicked on. 10) (page 291) Read the page about responding to users A) What does :hover do? This is applied when a user hovers over an element with a pointing device such as a mouse. B) What does :active do? This is applied when an element is being activated by a user; for example, when a button is being pressed or a link being clicked. C) What does :focus do? This is applied when an element has focus. Any element that you can interact with, such as a link you can click on or any form control can have focus. 11) (page 292) Attribute selectors. Read the page, but don t worry about this yet, it s a little advanced. We ll cover this later in the quarter.! 13

Look over the Chapter 12 example at: http://htmlandcssbook.com/code-samples/chapter-12/example.html (no answer required) 13) Homework! - Copy the class1.html page you created last week and name the copy sg2.html. Add the following to the new file.: A) A style rule that selects the h1 on the page. Give it at least 3 style declarations, one of which will change the font to a fantasy or cursive font. B) A style rule that selects any paragraphs on the page. Give it at least 3 style declarations. C) A style rule that selects any list items on the page. Give it at least 3 style declarations. Please place all of these style rules in a <style> tag at the top of the document. Do not use an external CSS file for these styles (so that I can check them more easily). Use a variety of text properties (question 8 above) and colors. Use the book, the book s example page, and/or the google for ideas. ******************************************************************************************* Submission: ZIP up this document post the ZIP to the dropbox before the due date. Your sg2.html file should be located at: http://gibson.rit.edu/username/230/ studyguides/sg2.html *******************************************************************************************! 14