Print Design Templates Take a look at these creative Graphic Design templates for brochures, flyers, newsletters, stationery, postcards, ads, menus and posters for a variety of businesses.
Invoicing 4 Freelancers A complete, secure, online billing application that maintains hourly service billing, flat fee billing and recurring charges. Integration with Authorize.Net and other leading payment gateways provides hands-free recurring billing with a sophisticated CRM system.
Free Design Magazines Browse through our extensive list of free Graphic Design, Web Design, Business, Computer, and Computer Graphics magazines, white papers, downloads and podcasts to find the titles that best match your skills and interests; topics include management, marketing, operations, sales, and technology. Simply complete the application form and submit it. All are absolutely free to freelance professionals who qualify.
Suggested Links Photoshop Tutorials
Logo Designer's Logos
Web Design Tools List
Layouts & Templates Directory
Web Design & Graphic Design Blog
Photoshop, Flash, 3D Studio Max Tutorials
Web Designers & Developers
Crafts for Kids
Photoshop Tutorial Man
Tutorial Guide -- Free Webmaster Tutorials
Design Contests
How to Draw
Work From Home Job Search
OTHER SITES WE OWN
AllFreelance
Graphic Design Resources Directory
Graphics Tutorials Directory
Social Networking Articles
Design Sites Up
All Freelance Work & Portfolios
Graphic Design Community
Education & Learning Directory
![]() |
home > Web Design Tutorials > Programming Tutorials > XHTML Coding Tutorials > XHTML Document Type Declarations (DTDs)
The DTD
How the DTD that one defines in an XHTML document relates to the XHTML Elements.
DTD structure for tables
If you are new to (X)HTML you may often wonder what are the elements, attributes allowed for an (X)HTML element like table. This appendix allows you to look at an element, like the table element and read the rules for this element. For example if you look at the attributes of a table element, the DTD says that it allows a summary, width, border, frame, rules, cellspacing and cellpadding attributes.
Document Type Definitions
A The DOCTYPE definition line in an XHTML document specifies the document type by referencing a Document Type Definition (DTD). The DTD specifies the syntax and legal elements of an XHTML document. Three types of documents are defined…
XHTML DTD
The XHTML standard defines three Document Type Definitions.The most common is the XHTML Transitional…
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
Document type declarations
The first thing that should appear on any page that you create should be the document type declaration. This is a small element that tells the browser, or XHTML validator, what version of XHTML you are using. This is important because there are three different flavors of XHTML, below are the "doctype" declarations for each of them...
XHTML DTDs
Whether you use the XML declaration or not, every XHTML document must be defined as such by a line of code at the start of the page, and some attributes in the main html tag, which tell the browser what language the text is in. The opening line is the DTD (Document Type Declaration). This tells your browser and validators the nature of your page.
XHTML Doctype Declarations
An XHTML doctype declaration is used to officially state which version and XHTML compatibility level that you're using in your Webpage. Once you have included an XHTML doctype declaration at the top of your Webpage, you can use an XHTML validator to determine if the code used in your page actually conforms to the rules outlined by the version and compatibility level that you selected. Here's what a DOCTYPE declaration for XHTML 1.1 transitional looks like...
Doctypes (Document Type Definitions)
Here are structural templates to create conforming HTML and XHTML documents. All doctypes go above the html tag with the exception of all the XHTML doctypes which has the html tag included within the code.
Document Type Definitions and Valid XML
A DTD is the grammar of an XML page. It is an acronym that stands for Document Type Definition. It contains the elements, attributes, entities, and notations used in the XML document.
Elements, Entities, Attributes, and Notations
Elements, entities, attributes and notations are the building blocks of a DTD.
A Sample DTD
DTDs are not difficult to write, but it is often easier to write an XML document first, and then define the DTD based upon what you wrote. For this example, I wrote an XML document based on a portion of a family tree. Once the document was finished, I wrote my DTD to match.
“doctype”
Specifies the HTML version used in the document.
DTDs and Markup Languages
When you write HTML with some editors, you'll notice that there is this strange line written across…
Using the DOCTYPE Tag
If you've been designing Web pages for more than a few months, you are most likely aware of the difficulty in writing a page that looks the same in all browsers. In point of fact, it's impossible.
!DOCTYPE
The DOCTYPE element is an SGML (Standard Generalized Markup Language) tag that indicates the version name of HTML used in the current document.
Using !DOCTYPE
One of the more frustrating (and less well-known) aspects of the newer browsers (version 6+) is the way it performs in the absence of a DOCTYPE…
Iocode - Doctypes
In all W3C Standardized markup languages (ie: HTML, XHTML, XML, etc) Doctype definitions (also knows as DTDs) are used at the beginning of the document to describe specifically which markup language is being used. Unlike HTML, XHTML requires that a Doctype definition be placed at the beginning of a document to identify it as XHTML.
Doctype Definition
XHTML documents MUST have a DOCTYPE Declaration and it must validate against one of the three Doctypes, Strict, Transitional or Frameset!
XHTML Doctype
A DTD, or document type definition, is a collection of XML declarations that, as a collection, defines the legal structure, elements, and attributes that are available for use in a document that complies to the DTD.
DTD's
XHTML documents have three parts: the DOCTYPE (which contains the DTD declaration), the head and the body. To create web pages that properly conform to the XHTML 1.0 standard, each page must include a DTD declaration; either strict, transitional, or frameset. Each of the three DTD’s is described (with an example) below...
XHTML Examples
As you can probably guess by now, XHTML code looks very similar to plain old HTML code, with just a couple of syntactic differences. Three examples of valid XHTML documents are shown below.This example used the strict DTD, meaning that every single tag must be closed properly, all attributes assigned values and second example uses the transitional DTD, which provides....
Document Type Definitions
A Document Type Definition (DTD) 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. An XHTML DTD describes in precise, computer-readable language the allowed syntax or grammar of XHTML markup.
DOCTYPE
The DOCTYPE tag is used to declare the DTD (Document Type Definition) for an XHTML document…
XHTML Doctypes
Document Type Definitions (DTD) of XHTML coding is the same as the DTD of HTML coding. If you venture into learning XML, you will also be learning about creating an actual DTD file. For the purposes of a regular XHTML document, a standard DTD from the W3C can be used.
XHTML Documents
XHTML documents have a simple, common structure that forms the basis for designing all Web pages. This basic structure of tags is shown in the following listing with associated tags described in the following sections.
XHTML DTD Tutorials -The HTML 4.01 DTD
The HTML 4.01 standard is formally defined as three SGML Document Type Definitions (DTDs): the Strict DTD, the Transitional DTD, and the Frameset DTD. The Strict DTD defines only those elements that are not deprecated in the 4.0 standard…
XHTML DTD Tutorials -HTML Document Elements
Every HTML document should conform to the HTML SGML DTD, the formal Document Type Definition that defines the HTML standard. The DTD defines the tags and syntax that are used to create an HTML document. You can inform the browser which DTD your document complies with by placing a special SGML (Standard Generalized Markup Language) command in the first line of the document...
3 Document type definitions
There are currently 3 XHTML document type definitions…
XHTML 1.1 vs. XHTML 1.0 Strict
First of all XHTML 1.1 is an updated version of XHTML 1.0 strict. So some elements that were only valid for XHTML tranistional and frameset, weren't valid for XHTML strict and are not valid for XHTML 1.1.
Document Type Definitions (DTD)
A DTD is a "Document Type Definition" which specifies the syntax (grammatical structure) of a web page. Basically this allows the software that reads a web page code to know what kind of document rules it uses for it's code.
XHTML DTD
When an XHTML document is created, the DTD to which it conforms is declared at the top of the document. Each DTD may be recognized by a unique label called a Formal Public Identifier, or FPI. The literal, or quoted, text following the word PUBLIC is an FPI referring to the W3C's XHTML 1.0 DTD.
RECENT ARTICLES from Graphic Design BloG
[CaRP] Can't open cache file.
Business Cards: Ideas and Inspiration, Part II
Today we continue looking at business cards that stand out, and here’s hoping you get some inspiration and ideas! After all, you only get one first impression, so your business card should be something that showcases the best of your design abilities. On Wednesday we looked at the use of interesting shapes, 3D business cards, [...]
![]() |
![]() |
|
![]() |
![]() |
|
[CaRP] Can't open cache file.
Making the Move from Freelance Work to Full-Time Employment
If you are like me, after graduating from a graphic design school, your goal was to make it as a freelance web designer. The lure of flexible hours, working from home and the freedom to manage your own time was too much to resist. At some point, I decided it may be ?easier? to work [...]
Tips for Asking for a Raise
At some point in our careers, there is a time when we open our paychecks and breathe a sigh of disappointment. After years of studying at a graphic design school and countless hours spent devoted to learning from colleagues and researching new design techniques, the numbers on our pay stub just don?t seem to measure [...]
Stock vs. Original Digital Photography
A picture is worth a thousand words. Graphic design schools teach us that photos on web sites have the potential to capture our attention, motivate us to read more or even propel us to navigate to another web site entirely. They inflict emotion and can establish a connection between site visitors and the goods or [...]
3 Tips to Manage Content Updates
While walking through the pharmacy I passed the aisle filled with red heart-shaped boxes filled with chocolates and remembered Valentine?s Day is quickly approaching. Even though I was surrounded by so many representations of love, it reminded me of one thing that I actually despise ? web content updates! Graphic design schools teach many, many [...]
Should You Drop the Drop-Down Menus?
I was recently on a home improvement web site searching for ideas for renovating my bathroom. After a few minutes on the site I realized that I was not going to find what I was looking for ? it certainly could have been there, but I just could not find it. Menu after menu had me [...]
Sharpen Your Skills and Gain an Edge at 2011 Web Design Conferences
Graphic design schools prepare us well for our immediate future, but it takes effort to stay on top of the ever-changing field of web design. Following are a few of the upcoming conferences and trade shows meant to help you stay a step ahead of the competition.
Interaction Eleven In its fourth year, Interaction Eleven is [...]
All Web Design Resources is a Directory & Blog Full of Tools for Web Site Designers
All Web Design Resources Portal is a Web Site Design education directory with resources & articles for Graphic Designers, Web Developers, & Web Designers including a Web Design forum, blog, graphics software tips, web development resources, web programming tools, web design jobs, advice for new web designers about web design schools and education as
well as tips for freelance web design business owners, and much more.