Download presentation
Presentation is loading. Please wait.
Published byKaren Gilbert Modified over 8 years ago
1
Standards and Compliance
2
A Brief History of HTML HTML 1.0-2.0 1989 through 1991 Hypertext enabled pages but presentation was lacking HTML 3 1995 Required two separate web pages-one for Netscape and one for Internet Explorer HTML 4 1998 HTML structure was separated into two languages-one for HTML and a language for presentation (CSS) HTML 4.01 1999 XHTML 1.0 2000 Extensible Hypertext Markup Language
3
Browsers and HTML Does it matter which version of HTML you use? Yes. All kinds of elements were added to HTML that aren’t supposed to be used anymore. Why can’t those elements be used? Before CSS was invented HTML contained elements for presentation, not structure. With CSS, those elements are no longer necessary.
4
Browsers and HTML cont. How does a browser display pages with all the different versions of HTML? Browsers have two sets of rules for displaying Web pages: one for old HTML and one for the newer, standard HTML. When using the old rules, browsers are in the “quirks mode” because there are so many weird things that can happen on those pages.
5
Browsers and HTML cont. Problems arise when you are writing new HTML If you don’t tell the browser you are writing new HTML, it assumes you are writing old HTML and goes into the quirks mode
6
Browsers and HTML cont. Not all browsers agree on how to display the older HTML, but are pretty consistent with standard HTML. Quirks mode may result in pages looking a bit off. Solution is to tell the browser which version of HTML you are using.
7
Browsers and HTML cont. How do you tell the browser that you are using HTML 4.01? You must add one line to the top of your HTML files:
8
Breaking down the doc type definition <!DOCTYPE IT tells the browser this is specifying a document type for the page. This is NOT an HTML element. It has a “!” after the “<“ at the beginning which tells you it is something different.
9
Breaking down the doc type definition html This means that is the root (first) element in your page PUBLIC This means the HTML 4.01 standard is publicly available
10
Breaking down the doc type definition “-//W3C//DTD HTML 4.01 Transitional //EN” This part says we’re using HTML version 4.01 and that HTML markup is written in English.
11
Breaking down the doc type definition http://www.w3.org/TR/html4/loose.dtd> http://www.w3.org/TR/html4/loose.dtd This points to a file that identifies this particular standard The tricky part is typing all the slashes, quotes, etc. Instead of typing it in, it is best to copy and paste from the doctype file which I downloaded in the Internet and Multimedia file in the Business Tutorials.
12
Adding the document type definition The doctype line goes at the beginning of the document before the tag.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.