...

View Full Version : Is there a difference?



michelle32145
10-27-2008, 04:05 AM
Does anyone know if I can head directly for XHTML without learning HTML?
Is there a difference?

jamesicus
10-27-2008, 04:23 AM
Does anyone know if I can head directly for XHTML without learning HTML? Is there a difference?

Just my opinions and observations: No reason not too -- the structural requirements of XHTML usually leads to better markup writing habits: http://www.w3.org/TR/2002/REC-xhtml1-20020801/#xhtml

On the other hand I don't think there is much to be gained in not using HTML 4.01 (but always using strict DTDs to avoid deprecated elements/attributes)

Here are some other considerations (http://jp29.org/test.php)

James

GalaxyCode
10-27-2008, 05:03 PM
Does anyone know if I can head directly for XHTML without learning HTML?
Is there a difference?

XHTML:
<img src="hi.gif" alt="" border="0" />
HTML:
<img src="hi.gif" alt="" border="0"></img>

Name the one big difference.

sybil6
10-27-2008, 05:17 PM
xhtml is a html document formed like a xml document, to form the document is harder as rules are strict.


the w3c says:
What You Should Already Know

Before you continue you should have a basic understanding of the following:

* HTML and the basics of building web pages

If you want to study HTML first, please read our HTML tutorial.


LOL:

The id Attribute Replaces The name Attribute

HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.

This is wrong:

<img src="picture.gif" name="picture1" />

This is correct:

<img src="picture.gif" id="picture1" />

Note: To interoperate with older browsers for a while, you should use both name and id, with identical attribute values, like this:

<img src="picture.gif" id="picture1" name="picture1" />

ifubad
10-27-2008, 07:57 PM
XHTML:
<img src="hi.gif" alt="" border="0" />
HTML:
<img src="hi.gif" alt="" border="0"></img>

Name the one big difference.

There is no closing tag for the replacement img tag

Apostropartheid
10-27-2008, 08:22 PM
There is no closing tag for the replacement img tag
*giggles* Yes, you're right, they're both XHTML representations of the img element, but an honest mistake, I'd bet my profession on



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum