473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Creating a simple XHTML page

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="keywords" content="CIW, XHTML 1.0, Habitat for Humanity"/>
<meta name="Description" content="Simple XHTML page for Habitat site"/>

<title>Habitat for Humanity International Summer Youth Blitz Program</title>
</head>

<body bgcolor="white">

Join a Summer Build for Teen-agers.
The Summer Youth Blitz is a unique service experience for a diverse group of
youth, ages 16 to 18, from high schools and youth organizations around the
United States. This page will validate as XHTML 1.O Transitional.
</body>
</html>

can anybody tell me what is wrong with this code.
Mr.T
Dec 29 '05 #1
1 1805
PATRICIA THOMPSON wrote:
<html xmlns="http://www.w3.org/1999/xhtml"" xml:lang="en">
I suppose your request "can anybody tell me what is wrong with this
code" meant to ask what is _technically_ or, more exactly,
_syntactically_ wrong with it.

The line quoted above has the first syntax error. It has two consecutive
quotation marks at the end of the first attribute; remove on of them.
<meta name="keywords" content="CIW, XHTML 1.0, Habitat for Humanity"/>
That's syntactically valid but not recommended. The recommendation is to
leave a space before the "/". Moreover, the tag is mostly useless or worse.
<meta name="Description" content="Simple XHTML page for Habitat site"/>
Ditto. Why would you emphasize XHTML here? It's just the technical
format of the document. Besides, it's a _wrong_ format on the Web.
Didn't anyone tell you that Internet Explorer does not support XHTML and
has no expressed intentions of doing so in the foreseeable future.
<body bgcolor="white">
That's not allowed in XHTML 1.0 Strict, which your document in fact
purports to use (in the DOCTYPE declaration). It's also harmful, since
you would set background color _only_. Always set background color,
background image, text color, and the three different link colors if you
set one of them (and do that in CSS, not in HTML). If you don't know how
to do that, don't set any of them before you know the techniques.
Join a Summer Build for Teen-agers.
The body starts with text, which is not allowed in XHTML 1.0 Strict:
all content must be wrapped inside block level containers like
<h1>...</h1>, <p>...</p>, or <div>...</div>.
This page will validate as XHTML 1.O Transitional.


That would be a worse than pointless statement on a page even if it were
true. Cf. to the damage caused by "Valid HTML!" icons, as explained at
http://www.cs.tut.fi/~jkorpela/html/...tion.html#icon
(Besides, it's 1.0 with digit zero, not 1.O with capital letter o.)

Suggestion: Use HTML 4.01 Strict.

P.S. In future, please post a URL, not a copy of the HTML source.
Dec 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Haines Brown | last post by:
Re. <title>, my impression has been that a line break is _NOT_ allowed in the contained text. Is that true? Also, I gather a double quotation mark in the text string (and ampersand, etc.) _IS_...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
18
by: Geoff Cox | last post by:
Hello, I am trying to print out the array values for a second time but get error on page message? Thanks Geoff <html>
1
by: bill | last post by:
I'm using VS2005. I am dynamically adding a Textbox control to a Placeholder control in the page_load event of the form, but the event handler isn't firing. What am I doing wrong? Thanks...
1
by: Ted | last post by:
In MS SQL I used the following to create a stored procedure. USE AdventureWorks; GO IF OBJECT_ID ( 'HumanResources.usp_My_Search', 'P' ) IS NOT NULL DROP PROCEDURE HumanResources.usp_My_Search;...
2
by: Dave | last post by:
It seems that if I put just html inside a master page, everything works fine. But if I put other controls (such as WebControls and/or my own custom controls), I can't seem to access the content...
4
by: Marijn | last post by:
Hey everybody, The following has been posted before (2 years ago) but no response was added. Therefor again, the following code for creating xhtml file: <?php error_reporting(6143); ...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
2
by: divyac | last post by:
I have developed an address book using php and mysql.I have all the contacts list in a table with check boxes.Now that i want to create mailing labels for the checked contacts...i.e.,the arrangements...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.