MP3 (W7,8,&9): HTML Validation (Debugging) Instruction

Similar documents
How the Internet Works

INTRODUCTION TO WEB USING HTML What is HTML?

HTML Overview. With an emphasis on XHTML

Implementing a chat button on TECHNICAL PAPER

Introduction to HTML5

What is XHTML? XHTML is the language used to create and organize a web page:

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

From administrivia to what really matters

Web Development IB PRECISION EXAMS

HTML. Hypertext Markup Language. Code used to create web pages

Creating Web Pages Using HTML

Module 2 (III): XHTML

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

CSCI 1100L: Topics in Computing Spring 2018 Web Page Project 50 points

c122jan2714.notebook January 27, 2014

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

SilverStripe - Website content editors.

First, create a web page with a submit button on it (remember from creating forms in html?):

Programmazione Web a.a. 2017/2018 HTML5

4. You should provide direct links to the areas of your site that you feel are most in demand.

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

Dreamweaver: Portfolio Site

Introduction to. Name: Class: ~ 1 ~

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

introduction to XHTML

Motivation (WWW) Markup Languages (defined). 7/15/2012. CISC1600-SummerII2012-Raphael-lec2 1. Agenda

Web Publishing Basics I

Dreamweaver: Accessible Web Sites

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

(from Chapter 5 & 25.6 of the text)

HTML TIPS FOR DESIGNING.

Html basics Course Outline

Design Project. i385f Special Topics in Information Architecture Instructor: Don Turnbull. Elias Tzoc

Web Site Design Principles

Anatomy of an HTML document

Seminar on Web Design

HTML: The Basics & Block Elements

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

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

3 Categories and Attributes

Bridges To Computing

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar

CompuScholar, Inc. Alignment to Utah's Web Development I Standards

Calendar Project. Project Brief. Part I: A Date to Remember. Assignments are evaluated for understanding

(1) I (2) S (3) P allow subscribers to connect to the (4) often provide basic services such as (5) (6)

Create a cool image gallery using CSS visibility and positioning property

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

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

Vebra Search Integration Guide

Guide for Creating Accessible Content in D2L. Office of Distance Education. J u n e 2 1, P a g e 0 27

CMPT 165 Unit 2 Markup Part 2

The Structural Layer (Hypertext Markup Language) Webpage Design

Developing a Basic Web Page

Full file at New Perspectives on HTML and CSS 6 th Edition Instructor s Manual 1 of 13. HTML and CSS

There are four (4) skills every Drupal editor needs to master:

CSCU9B2 Practical 1: Introduction to HTML 5

Web Programming Week 2 Semester Byron Fisher 2018

HTML Overview formerly a Quick Review

GIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.

FUNDAMENTALS OF WEB DESIGN (46)

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

HTML & XHTML Tag Quick Reference

Accessibility Compliance. Web Services

Sample Report Failures by group

Lessons from an Accessible Website:

Today. Web Accessibility. No class next week. Spring Break

INTERNET!!!11!1. Beyond the Mouse A Short Course on Programming. 10b. HTML/CSS or: I m on the. Ronni Grapenthin. November 13, 2011

Creating Accessible Web Sites with EPiServer

Fundamentals: Client/Server

Shane Gellerman 10/17/11 LIS488 Assignment 3

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

Title: Dec 11 3:40 PM (1 of 11)

Part 1: HTML Language HyperText Make-up Language

Creating and Building Websites

FUNDAMENTALS OF WEB DESIGN (405)

MP5: Hypermedia Integration- Dreamweaver

What You Will Learn Today

Aleph - Web Opac Accessibility. Accessibility in Aleph500 Web OPAC

It is possible to create webpages without knowing anything about the HTML source behind the page.

Semantic Web Lecture Part 1. Prof. Do van Thanh

USER GUIDE MADCAP FLARE Accessibility

What is Web Accessibility? Perspective through numbers... 3 Students will not always identify Headers in Canvas: As Easy as 1, 2 & 3...

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

ATSC Week 2 Web Authoring

c122sep814.notebook September 08, 2014 All assignments should be sent to Backup please send a cc to this address

Announcements. Paper due this Wednesday

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

HYPERTEXT MARKUP LANGUAGE ( HTML )

Blackboard staff how to guide Accessible Course Design

Beginning Web Site Design

MP4: Hypermedia Integration- Dreamweaver

Creating Accessible Word Documents

Hypertext Markup Language, or HTML, is a markup

Modify cmp.htm, contactme.htm and create scheduleme.htm

zetoc Website Accessibility Project

ATSC 212 html Day 1 Web Authoring

Transcription:

MP3 (W7,8,&9): HTML Validation (Debugging) Instruction Objectives Required Readings Supplemental Reading Assignment In this project, you will learn about: - Explore accessibility issues and consider implications of web design on diverse audiences. - How to validate your web pages - How to debug - Creating Accessibility Web Sites http://vision.unco.edu/accessibledesign/index.htm - Leveling the Road Ahead: Guidelines for the Creation of WWW Pages Accessible to Blind and Visually Handicapped Users http://people.rit.edu/easi/itd/itdv02n4/article6.htm - Recommended DTDs to use in your Web document http://www.w3.org/qa/2002/04/valid-dtd-list.html - HTML <meta> tag http://www.w3schools.com/tags/tag_meta.asp - Fix Your Site With the Right DOCTYPE http://www.alistapart.com/stories/doctype/ - Web Accessibility http://www-03.ibm.com/able/guidelines/web/accessweb.html - Meta Tags http://www.htmldog.com/guides/htmlintermediate/metatags/ - Please complete Debugging Exercise. I. Important Concepts 1. What is HTMLValidator? You may not bother to make your page XHTML-compliant. Later you may find your site appearing inconsistently across the web browsers. That's why you should take the necessary steps NOW to make sure that the HTML code on your web site follows the XHTML specifications. So what is HTML validation? This is the process to analyze an HTML document in comparison to standard HTML rules, for identifying errors and non-standard codes. You can check the html validation of your web page by entering your URL at: http://validator.w3.org/ In the validator website, you can either check the html validation for your pages via their URL or you can upload your.html files to the website for checking. I encourage you to directly validate your pages via the URL so that you know the.html file on your Zipspace is the most current. Instructional Technology, Educational Foundations and Leadership 1

For example, I have these codes on my page: ------------------------------------------------------------------------------------------------------------------ "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head> <title></title> </head> <p>this is an example of Mini Project 4 assignment. In this assignment, you need to validate:</p> <ul> <li>your assignment page</li> <li>your Mini Project 1-4 assignment</li> ------------------------------------------------------------------------------------------------------------------- Then, I validate my page on: http://validator.w3.org/, and here are the messages that I received: ------------------------------------------------------------------------------------------------------------------- This page is not Valid XHTML 1.0 Transitional. Below are the results of checking this document for XML well-formedness and validity. 1. Line 3, Column 6: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml <html> Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> This error message means that I must contain specification for namespaces (xmlns) and language (xml lang="en" for English) in the <html> tag. Nowadays, this requirement also applies to the transitional DOCTYPE. 2. Error Line 15 column 12: end tag for "ul" omitted, but OMITTAG NO was specified. You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". This error message means that I have neglected a closing ul tag 3. Info Line 11 column 9: start tag was here. <ul> This information reminds me that I have open ul tag that has not closed yet. Hint: All of the tags must be closed (either in pairs or self close) 4. Error Line 15 column 12: end tag for "body" omitted, but OMITTAG NO was specified. This error message means that I have neglected a closing body tag. 5. Info Line 7 column 6: start tag was here. This information reminds me that I have open body tag that has not closed yet. -------------------------------------------------------------------------------------------------------------------- Instructional Technology, Educational Foundations and Leadership 2

So, here is the correction (note for the red color): -------------------------------------------------------------------------------------------------------------------- "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>unit 4</title> </head> <p>this is an example of Mini Project 4 assignment. In this assignment, you need to validate:</p> <ul> <li>your assignment page</li> <li>your Mini Project 1-4 assignment</li> </ul> </body> ------------------------------------------------------------------------------------------------------------------- 2. What does Website Accessibility mean? Website accessibility is becoming increasingly important since right now the website has a wider audience. Individuals with disabilities access the web in several ways. They may use customized browser settings, such as font size, and color and screen resolution. They may also rely on assistive devices such as screen readers, text readers and voice-activated devices. However, if the HTML code used to build web pages is not appropriately optimized, these assistive technologies can become ineffective, and the website can become inaccessible. An accessible web page should at least: provide alternative text descriptions for the images provide headers for columns and rows in tables that contain data have high contrast between background and text meet Section 508 Standards II. Other Resources The following links provide information about a variety of disability issues and gives guidelines for creating sites to accommodate all users. Designing Web Pages for Sight Impaired Users If you are involved in making Web pages accessible for users with sight impairments, check out "Disabled Accessibility: The Pragmatic Approach," by Jakob Nielsen ("The Alertbox," June 13, 1999 issue). Nielsen includes a link to the W3 Web Content Accessibility Guidelines 1.0, the W3's prioritized list of design rules, and a very useful checklist for Web page designers. Making Websites Accessible Rey Junco, counselor in the Pennsylvania State University Office for Disability Services, visited the University of North Carolina at Chapel Hill campus this month. Using examples from UNC-CH Web pages, Junco gave a presentation on creating Websites that are readable and navigable by users with sight, hearing, or motor disabilities. He also provided a list of Websites that address guidelines and the laws that cover disability issues: Instructional Technology, Educational Foundations and Leadership 3

- Watchfire WebXACT Home Page Watchfire WebXACT is a program that checks Web pages for accessibility. http://webxact.watchfire.com/ - W3C Web Content Guidelines Working Group The goal of this group is to produce the Web Content Accessibility Guidelines. http://www.w3.org/wai/gl/ - The Assistive Technology Act of 1998 This act supports programs of grants to States to address the assistive technology needs of individuals with disabilities. http://www.section508.gov/docs/at1998.html - The Workforce Investment Act of 1998 The act ensures that individuals with disabilities have access to and use of information and data that is comparable to the access to and use of the information and data by such members of the public who are not individuals with disabilities. http://www.usdoj.gov/crt/508/508law.html - Department of Justice Americans with Disabilities Act Home Page http://www.usdoj.gov/crt/ada/adahom1.htm II. Programming Style & Debugging 1. Programming Style Computers and browsers don't care what your XHTML code looks like. If it is correctly structured, then everything will work fine. BUT computers are not the only things viewing your code. You must review it as you write it (looking for problems) and everyone on the Internet can view your code (viewing the source). With potentially millions of eyes viewing your code and you spending your precious time hunting for those mysterious errors, it is extremely important to write XHTML in good style. The code should be easy to read. White space and indentation are your friends. Look at the following examples. Example 1 "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html><head><title>this is a title</title></head><p>this is a paragraph</p><p>this is another paragraph</p></body> Example 2 "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head> <title>this is a title</title> </head> <p>this is a paragraph</p> <p>this is another paragraph</p> </body> Instructional Technology, Educational Foundations and Leadership 4

Both examples above are using XHTML correctly, but which one is easier to read? It is good programming practice to use example 2 to write your code. Each example will display the same way in a browser, but the first example is difficult for me to grade and difficult for you to de-bug. When we write XHTML, we're not writing text to be viewed on a page. We're writing code that will be rendered by a browser to display stuff on a page. XHTML has structure. We do cool stuff with XHTML through the use of tags. Tags generally come in pairs: opening and closing. One of the most common mistakes of beginner, and experienced, web developers is to forget the closing tag. Get in the habit of writing your XHTML by lining up the opening and closing tags. Then all you have to do is to find the opening tag and run straight down the page to find the closing. If it s not there, then you forgot it. It's that easy! Now you have probably noticed that some of my tags are not vertically aligned. Why? This is how I write my code. We will all write a little differently. I vertically align tags that hold other tags, but horizontally align tags that only hold text. Why? It's my style. I think it looks "pretty". :-) The important point is to develop an indenting style and stick with it. After a while, your "style" will become such a habit that you will instinctively know when you forgot something. 2. Commenting The comment tag (<!-- -->): When creating web pages, the page of your source code may get longer and messier when you have richer content. Using comments can serve as a reminder for yourself or other programmers about what you are doing. The comment tag (<!--This is a comment.-->) is what you need to use when adding a comments in the HTML source. The text inside the <!-- --> tag is ignored when the HTML file is parsed. Thus, the comments will not show up on web pages but only in the HTML source. *Applying comments correctly for this assignment: In this class, we will use comments in another way. In the following projects, you will be asked to add comments for the tags you used. The purpose of adding comments in projects is to demonstrate your understanding of the tags. You will explain the functions of the tags and the reason you use them. For example, if you use a <table> tag, you will need to add comments like the following, <!--A table tag is used to help me control the placement of the image. The border is set to 0 so that the grid of the table will not display in the web page. --> <table border= 0 > <!--The <tr> tag lets me create 2 table rows. --> <tr > <!--The <td> tag is used to create columns. I have one column in the first row and 2 columns in the second row. --> <td> <!--The <img> tag is used to insert a picture of my work. --> <img src= 3960/image.gif alt= My hometown. width= 480 height= 360 /> </td> </tr> </table> 3. The Debugging Task (Class Exercise) Your task for this exercise is to analyze the HTMLcorrection.html file attached to the Debugging Assignment in the Assignments tool. Download the HTMLcorrection.html file and open it in your text editor such as Notepad or TextWrangler. Find the errors and fix them based on the XHTML transitional 1.0 specifications. You should not make any design decision with this file -- only fix the incorrect code. You may use the xhtml validator (http://validator.w3.org/) to help you find the bugs. Also, you can add Instructional Technology, Educational Foundations and Leadership 5

commenting in the source code to show which part that you have changed and the reason that you made such changes. You re encouraged to use the checklist of xhtml specifications provided 0n the page 4 of W2 Basic HTML Structure Instruction (under Content/Week 2 Folder). They should help you to interpret the error messages that you may receive from the validator. You can use the DB: Topic 9 Weekly Discussion to ask for questions regarding the validation. When you made all necessary changes, the page rendered in a web browser should be similar to the image below. Instructional Technology, Educational Foundations and Leadership 6