Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Document Type Definition

A DTD is a "Document Type Definition" which specifies the syntax (grammatical structure) of a web page in SGML, the Standard Generalised Markup Language - of which HTML is an application. SGML (Standard Generalized Markup Language) is an international standard for the definition of device-independent, system-independent methods of representing texts in electronic form. More precisely, SGML is a metalanguage, i.e. a method of formally describing a language, in this case, a markup language. HTML is a markup language written in SGML - an "SGML application". HTML is a specific application or document type of the meta-language SGML.

HTML is specified in an SGML document type definition or 'DTD'. An HTML DTD describes in precise, computer-readable language the allowed syntax and grammar of HTML markup. The formal specification is represented by "DTDs". A DTD, or Document Type Definition file is used by SGML applications, e.g. HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.

There are various versions of HTML, each described by a unique DTD. Validating an HTML document's content involves checking its markup against a DTD and reporting markup errors. There are various HTML document types in use on the Web, arising from various levels and versions. Each DTD may be recognized by a unique label called a formal public identifier or FPI [public use of a DTD implies some measure of universal availability].

When an HTML document is created, the DTD to which it conforms is declared in a document type declaration at the top of the document. For example,

<!DOCTYPE HTML PUBLIC
	"-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>HTML Validation</TITLE>
</HEAD>
<BODY>
	<H1>HTML Validation</H1>
	...
</BODY>
</HTML>
(Note that the DOCTYPE line is broken in two only to prevent the example from being too wide for non-horizontal scrolling - you can keep it all on one line). The literal (ie., quoted) text following the word "PUBLIC" is an FPI referring to the W3C's HTML 4.0 DTD.

W3C HTML Validation Service

This is an easy-to-use HTML validation service based on an SGML parser. It checks HTML documents for compliance with W3C HTML Recommendations and other HTML standards. To use the W3C HTML 4.0 Recommendation, start your document with one of the following doctype declarations:

HTML 4.0 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.

HTML 4.0 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
				Transitional//EN">
Use this when you need to take advantage of HTML's presentational features because many of your readers don't have the latest browsers that understand Cascading Style Sheets.

HTML 4.0 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
				Frameset//EN">
Use this when you want to use HTML Frames to partition the browser window into two or more frames.

Content providers can use this service to validate their Web pages against the HTML 4.0 Recommendation, thereby ensuring the maximum possible audience for their Web pages. In addition, it can be used to check conformance against previous versions of HTML, including the W3C Recommendation for HTML 3.2 and the IETF HTML 2.0 standard.

To allow authors to broaden their audience even further to those with disabilities, the service will be updated according to the guidelines produced by W3C's Web Accessibility Initiative (WAI). You can also test your pages for accessibility using the Web-based Bobby service.

Half a Loaf is Better Than None
HTML Checkers
HTML Validators and Checkers


Up to => Home / Authoring / HTML / Validation




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers