Solved

Is the following code written in HTML or XHTML?

Posted on 2013-05-21
3
328 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set differnt row widths in a table. 3 21
Browser Chrome downloads colored link 5 40
Can't find PHP files on account that has WordPress 3 25
div to fit another div 8 20
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

808 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