Group+13

=HTML VS XHTML=

=Tags/rules that change between html and xhtml=

The main difference between html and xhtml is that xhtml is just an advanced way of writing xhtml. Xhtml is easier to maintain then html, certain rules such as all attribute names most be lower case and all elements have to have a closing tag. Since there is more guidelines to follow in xhtml it is easier to fix, on the other hand html guidelines are more broad and takes more time to isolate problems. Xhtml is different and more advanced then html because of its separation of presentation from structure, improved accessibility features, improved internalization features and improved document rendering.


 * 10 examples of common tags and elements that changed**


 * 1) All tags most be in lower case form = à
 * 2) All most be properly nested in right order to what its pertaining to =

Html à  Your Text 

Xhtmlà  YourText 


 * 3. All tags most be closed in xhtml unlike html where some are left open.**

html xhtml


 * 4. Image tag needs a to be close at the end with a space.**

Html  xhtml 


 * 5. All documents must have a doctype at the top of the page which declares what type of code you are writing for example html, xhtml, strict, loose, etc..**

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


 * 6. All documentation must be properly formed. Meaning the format of the page has to be in a certain order to be considered xhtml instead of html.

Order of a transitional xhtml doctype.**

//<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Page Title OTHER HEAD DATA CONTENT


 * 7. Avoid line breaks and multiple white space characters within attribute values. These are handled inconsistently by users.

8. Use both the lang and xml:lang attributes when specifying the language of an element. The value of the xml:lang attribute takes precedence.

9. The named character reference &apos; (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of &apos; to work as expected in HTML 4 user agents.

10. Don't include more than one isindex element in the document head. The isindex element is deprecated in favor of the input element.**

5 examples of common attributes and line code that changed
Width="100" and WIDTH="100" are wrong; only width="100" is correct.
 * 1. All XHTML attribute names should be in lower case.

2. All attribute-value pairs should be quoted. width=100 is wrong; it should be width="100" or width='100'.

3. HTML supports certain attributes which have no values. Examples are noshade which appears in the tag. XHTML does not allow such empty or compact attributes. The compact attributes generally found in HTML are compact, nowrap, ismap, declare, noshade, checked, disabled, readonly, multiple, selected, noresize and defer. They should always have a value. In XHTML this is done by giving the attribute name itself as the value.**

noshade becomes noshade="noshade"

checked becomes checked="checked"

 à 
 * 4. The name attribute is deprecated and will be removed in a future version of XHTML and the id attribute will take its place. So, for HTML tags that need the name attribute, an id attribute should also be specified with the same value as that for name.

5. All & (ampersand) characters in the source code have to be replaced with &amp;, which is the same code. This change should be done in all attribute values and URIs.**

Bee&Nee à Bee**&amp;**Nee.

Go à

Go.


 * 3 good web sources for using html and xhtml**

1. Brinkster.com – provides a tutorial on converting from html to xhtml.

http://www22.brinkster.com/beeandnee/techzone/articles/htmltoxhtml.asp

2. w3.org – provides information of html, xhtml, etc… and contains validators

http://www.w3.org/TR/xhtml1/

3. freewebmasterhelp.com – provides you with solutions to basic xhtml and html problems

http://www.freewebmasterhelp.com/tutorials/xhtml/3