SlideShare a Scribd company logo
1 of 4
Download to read offline
Lecture Notes – HTML Standards – Prepared by Sukh Sandhu


Page | 1 Concepts


       Why We Need Standards

       The World Wide Web, invented in the early 1990's, made it possible to
       distribute documents globally without worrying about what kind of computer
       or software the user had (as long as the user had an Internet-connected
       computer and a Web browser, of course). The way the Web was defined, the
       syntax of HTML was independent of computer type, and each kind of Web
       browser created was meant to display an HTML file correctly.

       At least this was the dream.

       The reality is that during the 1990's, economic and cultural forces muddied
       the waters. Some people made Web browsers that recognized HTML
       elements that had not been accepted as standards. Some companies created
       Web browsers fashioned to recognize company-specific (proprietary) HTML
       elements and attributes of elements. Some companies created Web browsers
       that recognized proprietary elements and attributes that were in conflict with
       the proprietary elements and attributes of other companies.

       Without standards, the World Web Web becomes fragmented. When you have
       to worry about what kind of browser you are using in order to see Web
       content, you're experiencing a problem that the Web was originally invented
       to solve.

       We need standards to make sure that all Web content is viewable by many
       different kinds of Web browsers--and not just the Web browsers of today,
       but the handheld devices, cell phones, or other Net devices that may be
       invented in the future.

       Using standards also lowers HTML production and maintenance costs. By
       educating HTML implementors in a fixed set of standards, you can reduce
       training time, increase the accuracy of implementation, reduce display
errors, improve the appearance of Web pages, and make it possible for
       further maintenance with the least amount of hassle.

       I advise that you stick to HTML standards and validate your HTML files so
Page | 2 that your Web pages are most likely to be satisfactorily displayed in the
       widest range of browsers and devices. The organization that coordinates
       HTML standards is the World Wide Web Consortium (W3C). You should
       bookmark their site as the best and most authoritative source for HTML
       standards. See also the Web Standards Project.

       Key things to keep in mind:

           1. HTML standards help you reach the widest possible audience.
           2. HTML is now specified as XHTML 1.0 (HTML + XML = XHTML). The
              expressiveness of XHTML 1.0 is quite impressive and complex.
              However, "plain old" HTML is still usable and quite useful.
           3. There are many technologies that are associated with HTML because
              they are used on a Web page or in conjunction with HTML. But these
              technologies are not HTML:
                  o   CGI (Common Gateway Interface)
                  o   Java
                  o   JavaScript (JavaScript is also not Java)
                  o   Dynamic HTML (DHTML)
                  o   XML (Extensible Markup Language)
                  o   A variety of other emerging technologies.
           4. Sometimes you are going to have to break the rules and use non-
              standard syntax for good reasons. Try to keep this to a minimum.

       How to Follow HTML Standards

           1. Identify which version of HTML you are using in your document
              through the DOCTYPE line at the top of your file. For documents that
              use only HTML 2.0 features (like hello, world), you could use this
              DOCTYPE statement:
              <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">

              For documents that use HTML 3.2 features, you could use this
              DOCTYPE statement:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

                 There are other DOCTYPE statements that you will need to use for
                 other versions of HTML. For example, to use HTML 4.01 features and
Page | 3         a "loose" conformance to syntax standards, you could use this
                 DOCTYPE statement:

                 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
                 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

                 You use another DOCTYPE statement when you create an XHTML
                 document. For example, look at this simple XHTML document and
                 use your browser to view its source to see its DOCTYPE statement.

                 See the W3C site for more information on document types and
                 DOCTYPE statements.

                 The important thing to remember is that a DOCTYPE statement is
                 essential to assisting validation software in checking your document.

              2. Use tools that support standards. In particular, install and use the Tidy
                 program or Tidy GUI on your computer.
              3. Use validation to check the syntax of documents you create.
              4. Refer to W3C for technical and syntax information.

           Having correct HTML syntax helps your Web site's usability in the widest
           range of browsers. However, don't become a "syntax snob"--one who
           proudly verifies and tweaks HTML pages to perfect syntax, yet ignores the
           meaning and content of those pages.

           Consider these HTML tips when you are making Web pages.

           Exercise: Check a Web document

           Use validation to check the syntax of documents you have created.
Validating a Web Document

       You can detect and diagnose HTML syntax errors in your document by using
       a validator. First, make sure you have an appropriate DOCTYPE statement
Page | 4 (and, optionally, a character encoding statement) in your document. Then:


           1. Go the the Web page http://www.htmlhelp.com/tools/validator/
           2. Enter the URL of your assignment in the box which is labeled URL:
           3. Make sure that the checkbox for "show input" (second checkbox
              below the URL: box) is checked
           4. Click on "Validate it!"
           5. Fix the syntax errors you have. A good idea is to start with the first
              error that you have, fix it, and then re-validate. Repeat until you have
              no syntax errors.
           6. If you want, you can use the Tidy service to help you. See The HTML
              Toolbox under "Utilities." Tidy can help you diagnose HTML syntax
              errors, but it is not a validator. Any output you get from Tidy should
              be run through the validator again

More Related Content

What's hot

Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5nobel mujuji
 
Web Design & Development Courses in Pune| 3DOT Technologies
Web Design & Development Courses  in Pune| 3DOT TechnologiesWeb Design & Development Courses  in Pune| 3DOT Technologies
Web Design & Development Courses in Pune| 3DOT Technologiesabeda786
 
Web Design L1 - Untagling the Web
Web Design L1 - Untagling the WebWeb Design L1 - Untagling the Web
Web Design L1 - Untagling the Webmykella
 
Google chrome developer and tags
Google chrome developer and tagsGoogle chrome developer and tags
Google chrome developer and tagsgreg robertson
 
Lesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayLesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayCodecademy Ren
 
What the heck is HTML 5?
What the heck is HTML 5?What the heck is HTML 5?
What the heck is HTML 5?Simon Willison
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayCodecademy Ren
 
IN LIVING CODING
IN LIVING CODINGIN LIVING CODING
IN LIVING CODINGkdhicks2
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentFortySeven Media
 
Difference between html4 and html5
Difference between html4 and html5Difference between html4 and html5
Difference between html4 and html5Rahul Bathri
 

What's hot (14)

Html5
Html5Html5
Html5
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Web Design & Development Courses in Pune| 3DOT Technologies
Web Design & Development Courses  in Pune| 3DOT TechnologiesWeb Design & Development Courses  in Pune| 3DOT Technologies
Web Design & Development Courses in Pune| 3DOT Technologies
 
Web Design L1 - Untagling the Web
Web Design L1 - Untagling the WebWeb Design L1 - Untagling the Web
Web Design L1 - Untagling the Web
 
Google chrome developer and tags
Google chrome developer and tagsGoogle chrome developer and tags
Google chrome developer and tags
 
Lesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayLesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ay
 
What the heck is HTML 5?
What the heck is HTML 5?What the heck is HTML 5?
What the heck is HTML 5?
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ay
 
IN LIVING CODING
IN LIVING CODINGIN LIVING CODING
IN LIVING CODING
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
Learn HTML and HTML5
Learn HTML and HTML5 Learn HTML and HTML5
Learn HTML and HTML5
 
Raju
RajuRaju
Raju
 
Difference between html4 and html5
Difference between html4 and html5Difference between html4 and html5
Difference between html4 and html5
 
Html class-01
Html class-01Html class-01
Html class-01
 

Similar to HTML standards

Similar to HTML standards (20)

LIS3353 SP12 Week 8
LIS3353 SP12 Week 8LIS3353 SP12 Week 8
LIS3353 SP12 Week 8
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
wt mod1.pdf
wt mod1.pdfwt mod1.pdf
wt mod1.pdf
 
Web engineering notes unit 3
Web engineering notes unit 3Web engineering notes unit 3
Web engineering notes unit 3
 
WEB Module 1.pdf
WEB Module 1.pdfWEB Module 1.pdf
WEB Module 1.pdf
 
Lecture-1.pptx
Lecture-1.pptxLecture-1.pptx
Lecture-1.pptx
 
Web standards
Web standards Web standards
Web standards
 
Web Concepts - an introduction - introduction
Web Concepts - an introduction - introductionWeb Concepts - an introduction - introduction
Web Concepts - an introduction - introduction
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.ppt
 
Web Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV SyllabusWeb Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV Syllabus
 
Internet programming notes
Internet programming notesInternet programming notes
Internet programming notes
 
XHTML Web Designs.pdf
XHTML Web Designs.pdfXHTML Web Designs.pdf
XHTML Web Designs.pdf
 
HTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLHTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTML
 
Lecture 9 Professional Practices
Lecture 9 Professional PracticesLecture 9 Professional Practices
Lecture 9 Professional Practices
 
Iwt module 1
Iwt  module 1Iwt  module 1
Iwt module 1
 
mst_unit1.pptx
mst_unit1.pptxmst_unit1.pptx
mst_unit1.pptx
 
html5 project.pptx
html5 project.pptxhtml5 project.pptx
html5 project.pptx
 
Module 3
Module 3Module 3
Module 3
 
Module 5 and 6
Module 5 and 6Module 5 and 6
Module 5 and 6
 
Html Concept
Html ConceptHtml Concept
Html Concept
 

More from Sukh Sandhu

Qualified Social Media Expert
Qualified Social Media ExpertQualified Social Media Expert
Qualified Social Media ExpertSukh Sandhu
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureSukh Sandhu
 
Healthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some InformationHealthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some InformationSukh Sandhu
 
Mark-up languages
Mark-up languagesMark-up languages
Mark-up languagesSukh Sandhu
 
How to build a web page - SES Magazine
How to build a web page - SES MagazineHow to build a web page - SES Magazine
How to build a web page - SES MagazineSukh Sandhu
 
Content management system requirements checklist
Content management system requirements checklistContent management system requirements checklist
Content management system requirements checklistSukh Sandhu
 
The HTML Beginner Tutorial
The HTML Beginner Tutorial The HTML Beginner Tutorial
The HTML Beginner Tutorial Sukh Sandhu
 
Security problems in TCP/IP
Security problems in TCP/IPSecurity problems in TCP/IP
Security problems in TCP/IPSukh Sandhu
 
Personal development plan
Personal development planPersonal development plan
Personal development planSukh Sandhu
 
How to write a good business letter
How to write a good business letter   How to write a good business letter
How to write a good business letter Sukh Sandhu
 
When You Are Angry
When You Are AngryWhen You Are Angry
When You Are AngrySukh Sandhu
 

More from Sukh Sandhu (11)

Qualified Social Media Expert
Qualified Social Media ExpertQualified Social Media Expert
Qualified Social Media Expert
 
An introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lectureAn introduction to microsoft office 2007 lecture
An introduction to microsoft office 2007 lecture
 
Healthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some InformationHealthy Foods and Junk Food - Sharing some Information
Healthy Foods and Junk Food - Sharing some Information
 
Mark-up languages
Mark-up languagesMark-up languages
Mark-up languages
 
How to build a web page - SES Magazine
How to build a web page - SES MagazineHow to build a web page - SES Magazine
How to build a web page - SES Magazine
 
Content management system requirements checklist
Content management system requirements checklistContent management system requirements checklist
Content management system requirements checklist
 
The HTML Beginner Tutorial
The HTML Beginner Tutorial The HTML Beginner Tutorial
The HTML Beginner Tutorial
 
Security problems in TCP/IP
Security problems in TCP/IPSecurity problems in TCP/IP
Security problems in TCP/IP
 
Personal development plan
Personal development planPersonal development plan
Personal development plan
 
How to write a good business letter
How to write a good business letter   How to write a good business letter
How to write a good business letter
 
When You Are Angry
When You Are AngryWhen You Are Angry
When You Are Angry
 

HTML standards

  • 1. Lecture Notes – HTML Standards – Prepared by Sukh Sandhu Page | 1 Concepts Why We Need Standards The World Wide Web, invented in the early 1990's, made it possible to distribute documents globally without worrying about what kind of computer or software the user had (as long as the user had an Internet-connected computer and a Web browser, of course). The way the Web was defined, the syntax of HTML was independent of computer type, and each kind of Web browser created was meant to display an HTML file correctly. At least this was the dream. The reality is that during the 1990's, economic and cultural forces muddied the waters. Some people made Web browsers that recognized HTML elements that had not been accepted as standards. Some companies created Web browsers fashioned to recognize company-specific (proprietary) HTML elements and attributes of elements. Some companies created Web browsers that recognized proprietary elements and attributes that were in conflict with the proprietary elements and attributes of other companies. Without standards, the World Web Web becomes fragmented. When you have to worry about what kind of browser you are using in order to see Web content, you're experiencing a problem that the Web was originally invented to solve. We need standards to make sure that all Web content is viewable by many different kinds of Web browsers--and not just the Web browsers of today, but the handheld devices, cell phones, or other Net devices that may be invented in the future. Using standards also lowers HTML production and maintenance costs. By educating HTML implementors in a fixed set of standards, you can reduce training time, increase the accuracy of implementation, reduce display
  • 2. errors, improve the appearance of Web pages, and make it possible for further maintenance with the least amount of hassle. I advise that you stick to HTML standards and validate your HTML files so Page | 2 that your Web pages are most likely to be satisfactorily displayed in the widest range of browsers and devices. The organization that coordinates HTML standards is the World Wide Web Consortium (W3C). You should bookmark their site as the best and most authoritative source for HTML standards. See also the Web Standards Project. Key things to keep in mind: 1. HTML standards help you reach the widest possible audience. 2. HTML is now specified as XHTML 1.0 (HTML + XML = XHTML). The expressiveness of XHTML 1.0 is quite impressive and complex. However, "plain old" HTML is still usable and quite useful. 3. There are many technologies that are associated with HTML because they are used on a Web page or in conjunction with HTML. But these technologies are not HTML: o CGI (Common Gateway Interface) o Java o JavaScript (JavaScript is also not Java) o Dynamic HTML (DHTML) o XML (Extensible Markup Language) o A variety of other emerging technologies. 4. Sometimes you are going to have to break the rules and use non- standard syntax for good reasons. Try to keep this to a minimum. How to Follow HTML Standards 1. Identify which version of HTML you are using in your document through the DOCTYPE line at the top of your file. For documents that use only HTML 2.0 features (like hello, world), you could use this DOCTYPE statement: <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> For documents that use HTML 3.2 features, you could use this DOCTYPE statement:
  • 3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> There are other DOCTYPE statements that you will need to use for other versions of HTML. For example, to use HTML 4.01 features and Page | 3 a "loose" conformance to syntax standards, you could use this DOCTYPE statement: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> You use another DOCTYPE statement when you create an XHTML document. For example, look at this simple XHTML document and use your browser to view its source to see its DOCTYPE statement. See the W3C site for more information on document types and DOCTYPE statements. The important thing to remember is that a DOCTYPE statement is essential to assisting validation software in checking your document. 2. Use tools that support standards. In particular, install and use the Tidy program or Tidy GUI on your computer. 3. Use validation to check the syntax of documents you create. 4. Refer to W3C for technical and syntax information. Having correct HTML syntax helps your Web site's usability in the widest range of browsers. However, don't become a "syntax snob"--one who proudly verifies and tweaks HTML pages to perfect syntax, yet ignores the meaning and content of those pages. Consider these HTML tips when you are making Web pages. Exercise: Check a Web document Use validation to check the syntax of documents you have created.
  • 4. Validating a Web Document You can detect and diagnose HTML syntax errors in your document by using a validator. First, make sure you have an appropriate DOCTYPE statement Page | 4 (and, optionally, a character encoding statement) in your document. Then: 1. Go the the Web page http://www.htmlhelp.com/tools/validator/ 2. Enter the URL of your assignment in the box which is labeled URL: 3. Make sure that the checkbox for "show input" (second checkbox below the URL: box) is checked 4. Click on "Validate it!" 5. Fix the syntax errors you have. A good idea is to start with the first error that you have, fix it, and then re-validate. Repeat until you have no syntax errors. 6. If you want, you can use the Tidy service to help you. See The HTML Toolbox under "Utilities." Tidy can help you diagnose HTML syntax errors, but it is not a validator. Any output you get from Tidy should be run through the validator again