ICE: HTML, CSS, and Validation

Similar documents
Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Selectors in Action LESSON 3

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Development 1 A4 Project Description Web Architecture

HTML TIPS FOR DESIGNING

Outline of CSS: Cascading Style Sheets

HTML, CSS, XML, and XSL

Using Style Sheets for Consistency

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

{color:blue; font-size: 12px;}

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Web Design and Development ACS Chapter 9. Page Structure

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 2

Create Webpages using HTML and CSS

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

ITNP43: HTML Lecture 4

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

Campaign Guidelines and Best Practices

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Building Your Website

Web layout guidelines for daughter sites of Scotland s Environment

Create Your own Company s Design Theme

Using an external style sheet with Dreamweaver (CS6)

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

CST 150 Web Design I CSS Review - In-Class Lab

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Introduction to Web Design Curriculum Sample

How to code, test, and validate a web page

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

Website Planning Checklist

JJY s Joomla 1.5 Template Design Tutorial:

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

Designing HTML s for Use in the Advanced Editor

Style & Layout in the web: CSS and Bootstrap

WHITEPAPER. Skinning Guide. Let s chat Velaro info@velaro.com by Velaro

CIS 467/602-01: Data Visualization

Cascading Style Sheets (CSS)

WEB DESIGN LAB PART- A HTML LABORATORY MANUAL FOR 3 RD SEM IS AND CS ( )

Creating Web Pages with Dreamweaver CS 6 and CSS

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

Introduction to Adobe Dreamweaver CC

How to Properly Compose HTML Code : 1

Creating a Web Page Using HTML, XHTML, and CSS: The Basics

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Web Publishing Basics 2

Embedding a Data View dynamic report into an existing web-page

Creating the Surf Shop website Part3 REVISED

Contents. Downloading the Data Files Centering Page Elements... 6

FETAC Certificate in Multimedia Production. IBaT College Swords. FETAC Certificate in Multimedia Production Web Authoring Dreamweaver 3

Magento Responsive Theme Design

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

CHAPTER 10. When you complete this chapter, you will be able to:

Interspire Website Publisher Developer Documentation. Template Customization Guide

GUIDE TO CODE KILLER RESPONSIVE S

Fortis Theme. User Guide. v Magento theme by Infortis. Copyright 2012 Infortis

Advanced Drupal Features and Techniques

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

Coding HTML Tips, Tricks and Best Practices

CSS - Cascading Style Sheets

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

Web Design & Development - Tutorial 04

Caldes CM12: Content Management Software Introduction v1.9

Basic tutorial for Dreamweaver CS5

Interactive Data Visualization for the Web Scott Murray

Introduction to XHTML. 2010, Robert K. Moniot 1

Formatting Text in Blackboard

CSE 3. Marking Up with HTML. Tags for Bold, Italic, and underline. Structuring Documents. An HTML Web Page File

ICT 6012: Web Programming

Coding Standards for Web Development

Base template development guide

Making Content Editable. Create re-usable templates with total control over the sections you can (and more importantly can't) change.

Responsive Design

USD WEB SERVICES ADOBE DREAMWEAVER CSS DEVELOPMENT

Intro to Web Design. ACM UIUC

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Using Adobe Dreamweaver CS4 (10.0)

CSS for Page Layout. Key Concepts

04 Links & Images. 1 The Anchor Tag. 1.1 Hyperlinks

Web Design and Databases WD: Class 5: HTML and CSS Part 2

Responsive Web Design: Media Types/Media Queries/Fluid Images

Web Design for Programmers. Brian Hogan NAPCS Slides and content 2008 Brian P. Hogan Do not reproduce in any form without permission

Web Authoring CSS. Module Descriptor

Microsoft Expression Web Quickstart Guide

Creating HTML authored webpages using a text editor

An Attribute is a special word used inside tag to specify additional information to tag such as color, alignment etc.

Advanced Online Media Dr. Cindy Royal Texas State University - San Marcos School of Journalism and Mass Communication

Лваполо. Customization

Looking Good! Troubleshooting Display Problems

Introduction Designing your Common Template Designing your Shop Top Page Product Page Design Featured Products...

Module 6 Web Page Concept and Design: Getting a Web Page Up and Running

Web Design with Dreamweaver Lesson 4 Handout

Web Development I & II*

Lesson Review Answers

Transcription:

ICE: HTML, CSS, and Validation Formatting a Recipe NAME: Overview Today you will be given an existing HTML page that already has significant content, in this case, a recipe. Your tasks are to: mark it up with the appropriate HTML tags improve the presentation of the page by utilizing a variety of CSS properties as well as type, class, and id selectors. run it through the HTML validator at http://validator.w3.org/ to ensure your markup is well- written Part 1: Get the files 1. Download a copy of the startup files from the content area of our mycourses conference. 2. Rename the included HTML file to: kadayif.html. 3. Change the contents of the <title> tag so it includes your full name 4. Now, go ahead and preview the file in your browser. You should see something like this: 5. Pretty ugly, huh? Let s continue to part 2

Part 2: Adding Structure and Meaning to the Content Let s add some structural and semantic tags to this mess! 1. Add <h1> tags to the name of the dish at the top of the page. 2. Put the text Yield: 24 Servings into a <p> element. 3. Make the text Ingredients and Directions level 2 headers. 4. Put the ingredients into an unordered list. Give this list a class attribute of ingredients. 5. Put the directions into an ordered list. 6. Make the URL on the bottom of the page a hypertext link. 7. Wrap the updated URL in a <div> element. Give the div an id of footer. If should look like this: <div id= footer > <a href = http:// >source: http:// </a> </div> Note: replace the with the rest of the URL. 8. Right after the <h1> element, add an <img> tag that displays the image file provided. Set the src, alt, title, height, and width attributes to the appropriate values. The height and width values should be the actual height and width of the image. 9. Add a link at the bottom of the page (after the source link) that goes to your home page (the movies.html page you posted the last time). Wrap this link in a <p> tag. 10. Preview the page. It should look like the image at the top of the next page.

11. Test this page with the validator. Do not continue until the page passes validation. Part 3: Improving the Presentation with CSS Now, we ll apply CSS to improve the overall presentation of the recipe. 1. Now, let s add some document- level styles into our recipe.html page. Inside the <head> tag of the page (below the <meta> tag) add the following style tag: <style type= text/css > </style>

2. Inside of the <style> tag you just created, we will add a rule that will change the font for all of the text in the document. Add the following style rule between the <style> tags: body { font-family: trebuchet ms, tahoma, verdana; } Reload the page to make sure a change happened. 3. Now, add the following declarations to the body selector you just created: margin-left: 10%; margin-right: 10%; border: 1px solid gray; Test this! You should now see a border around the text. 4. Did you notice that the text is too close to the border? Let s fix that. Add the following to the body selector: padding-left: 1em; padding-right: 1em; Test it! There should be more room now. Notice how the margin declarations affect the outside of the body tag while the padding declarations affect the inside of the body tag. These properties work the same way with any of the other container elements (i.e., <p>, <ol>, <em>, etc.) 5. For fun, see if you can change the <h1> tag s background to a light gray. If you don t know how to set background colors in CSS, check in your textbook or search for it on- line. 6. Now, adjust the padding properties (padding- bottom, padding- top, etc.) of your h1 rule so the text fits into its box a little better. 7. Add the declarations necessary to center the <h1> tags text using the text- align property. 8. Stop! Validate your page. Do not continue until your page validates correctly. 9. Now, try validating the CSS you have used in your page. You can find the CSS validator at: http://jigsaw.w3.org/css-validator 10. Preview your page. It should look like the image at the top of the next page.

Part 4: Adding Even More Rules Now, make the following changes: 1. The items in your lists are tightly scrunched together. In the <style> tag, add a rule for the <li> tags that will put more space between each item. Use the following reference and look under the headings padding or margin for more ideas: http://www.w3schools.com/css/css_reference.asp 2. Add a gray (or any color other than white) background color to the list of ingredients. You can use the ingredients class selector to accomplish this. Check today s slides if you don t remember how to do this. 3. What happened? The background of the <ul class= ingredients > entity now stretches to fill most of the page. Fix this by using the width property in your style rule. Set the width to about 250 pixels. Then, set the list- style- type property to circle. Finally, adjust the padding so the list looks a little better.

4. This page would look a lot better if we put the image over on the right side of the page opposite the ingredients list. We can do this using the float property. We ll discuss float in our next lecture. For now, just add the following style rule to your page: img { float: right; clear: both;} 5. Now, let s change the Yield: 24 servings paragraph so it uses and in- line style (as opposed to the embedded styles we have been working with). Move the HTML for this so that it is before the img tag, not after. Then change the tag as follows: <p style= float: right; font-weight: bold >Yield: 24 servings</p> 6. Add a class selector rule named:.important. Set this rule so that text will be rendered in red, 10% larger than the default font size, and with a yellow background. 7. Use the <span> tag to apply this class to the text Place on lowest oven rack. 8. Now, use another <span> tag to apply the same class rule to the text Cool near the bottom of the instruction list. 9. Validate your HTML! 10. Your page should now look something like the image on the next page.

Now, while this page probably won t win any design awards, the look and accessibility of the content has radically improved! Part 5: Put Your Stamp On It 1. Change the footer text at the bottom of the page to a light gray color using the #footer selector. 2. Add three additional CSS properties to the page that we have not yet used. Part 6: Put the Document Through HTML Validation Use the on- line tools to make sure that your page is well- formed and passes HTML5 validation. *** ONCE YOU ARE DONE, ZIP UP YOUR FILES AND SUBMIT THEM TO THE DROPBOX BEFORE NEXT CLASS. MAKE SURE YOU UPLOAD THIS TO YOUR 230 EXERCISES FOLDER ON GIBSON, AND LINK TO IT FROM YOUR MAIN PAGE. ***