VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 13:23:07 05/26/03 Mon
Author: gam3r_3xtr3m3
Subject: XHTML 1.0+ Explanation



XHTML - Extensible Hypertext Markup Language - has been a big mystery to most website designers and even to other programmers. Here I will explain to you XHTML.



The plan of W3C for XHTML is quite simple, primarily to overtake HTML and to create a language that can be used in any devices (palm, cellphone) other than the Personal Computer.



XHTML 1.0 doesn't offer any new tags but gives new syntaxes and formattings that are better to follow and easier to understand.
Next versions of XHTML should give away tags. Here are some of the rules:



1. Always start the file with a !DOCTYPE declaration:

Since XML supports custom DTD usage and recent browsers doesn't support XHTML.

It is recommended and required to use the !DOCTYPE declarations for XHTML.


Here are the 3 types of !DOCTYPE declarations for XHTML:




2. For XHTML 1.1, (A very strict DTD version) the XHTML page should have a
<? xml ?> declaration:



Example: <? xml version:"1.1" xml-lang:"en"
lang:"en-us" ?>



3. If you open one, you should definitly close one!

All Tags in XHTML should be closed when opened:



Example: 



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

<? xml version:"1.1" xml-lang:"en" lang:"en-us"
?>

<html>

<head>

<body>

<p>Hi

</body>



Is an error. Note that there is no closing on both <html> and
<head> tags. And the <p> tag.



4. No nested tags!


Example: <p><center>Hi</p></center> is wrong!

Should be <p><center>Hi</center></p>!


5. Close everything!

Since some HTML tags doesnt have closing tags (ex. <img>), it is required
to use a "space-slash notation".


Example: <img src="pic.jpg" />


6. <style> elements should not be commented in XHTML.


Example:


<style type="text/css">

<!--


p {color: #000000}


//-->

</style> is wrong!


Should be only:


<style type="text/css">

p {color: #000000}

</style>


7. Some depreciated tags:


<applet> - use <object> instead


<b><u><i> - use CSS instead


<isindex> - use XHTML Form input tags


<basefont> - use CSS instead


These are just some short explanations to the subject. Take care! - Andrew


 






[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:



Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


Forum timezone: GMT+8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.