Solved

Is the following code written in HTML or XHTML?

Posted on 2013-05-21
3
335 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prevent certain words from being typed in a form 6 56
WordPress Page Content Lost 2 50
calculate days away 11 61
CSS background-color 5 19
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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 …

751 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