Solved

Is the following code written in HTML or XHTML?

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

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 82

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Read about why website design really matters in today's demanding market.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now