Solved

Is the following code written in HTML or XHTML?

Posted on 2013-05-21
3
332 Views
Last Modified: 2013-05-21
Is the following code written in HTML or XHTML?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<title>MSearch</title>
0
Comment
Question by:zimmer9
  • 2
3 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39185515
Since it says XHTML, I'm not sure why you are asking.  We'd have to see the rest of the page to see whether it followed HTML4, XHTML, or HTML5 rules.  The part you have posted says it is Supposed to be XHTML.
0
 

Author Comment

by:zimmer9
ID: 39185548
So you can't tell by the META tag alone whether it is HTML or XHTML?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39185612
The DOCTYPE tells what it is Supposed to be.  HTML4, XHTML, and HTML5 all define rules that you are supposed to follow for the page to be displayed correctly for that DOCTYPE.  And they are all a little, sometimes a Lot, different.  This page http://www.w3.org/standards/techs/html#w3c_all lists the current standards and this http://www.w3.org/html/wg/drafts/html/master/ is the continuously updated page for HTML5.  

This page http://validator.w3.org/ can be used to check your pages to see how well they follow the rules for the DOCTYPE you have used.  It is a good but not completely 'perfect' check.  Some things that are commonly done are not part of the rules.  That especially includes embedding Flash in your pages.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question