Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML, DHTML, XML or which one to follow ? 3

Status
Not open for further replies.

ramani

Programmer
Mar 15, 2001
4,336
AE
Hi

1. When I started creating my first WEB, I started with FP - because FP was available as part of office product. As a result I ended up with what ever HTML it was providing.

2. When I started validating with W3C, I realised, HTML 4.0 and HTML 4.01 existed. When I used editor EDIT-PLUS2, it was creating in HTML 4.0. When I used HTML-Kit as the editor, It created in HTML 4.01. I noticed some tag differences between the two, as I found out during validation. HTML-Kit had nice way of converting one version to another, but landed in some failures - specialy with special characters usage such as &.
As a natural learning I started CSS and creating separate CSS files, link it with HTML files. After using these two editors, I do not feel like using FP. FP is for beginners. (just kidding.. I am a beginner too! But a fast shaping beginner.)

3. Then I realised XML and related.. probably.. XSL.
Then there is XHTML 1.0 and 1.1.

Now the point is, every one want to start with the latest and dont want to go with the earlier version. To be more specific, the learning in a latest version is the way to go. But this may not be true in WEB development, because there could be older browsers not capable of dealing with the latest... while the latest browsers could be capable of dealing with older version language.

I also read somewhere that support in newer browsers for HTML could be discontinued. But I failed to dig in that page as I had to poceed somewhere. I lost that link as well.

And the QUESTION is, what is the strategy to follow. Which version to follow. Guidance from experts requested so that I can go with the more specific one, rather than learning an obsolete one.

Thanks for the time :)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
XML is merely a set of conventions to follow to provide a way to store or communicate data in a well defined and well know method. Building a full website with a combination of XML (data/content) and XSL(presentation of data/content) is possible, but if that data will only be used for the content of the website than it is unnecessary to store that content(XML) seoperately from the conversion to presentation(XSL).

XHTML is the latest flavor of HTML. It takes the objects and rules of HTML and a stricter definition that is compliant to the guidelines for the XML standard. XHTML is understandable by older browsers because it is not a new language, just a more restrictive syntax than standard HTML, which is very forgiving about sloppiness. As newer browsers are created they lean more and more towards XHTML because, by it's nature, XHTML is easier to parse and render in the browser.
Since XHTML is well-formed and has stricter guidelines, the rbowser can more efficently parse it, leaving less need for guesswork on the part of the browser.

For example, a browser presented with the following syntax:
Code:
<select name=selColors>
   <option value=red>Red
   <option value=blue>Blue
   <option value=green>Green
</select>
has to make several decisions. First, since this is HTML (XHTML is defined with a beginning tag in the document) it has look at each tag attribute and render the value internally based on the fact that the equals sign could have a single quote, double quote, or simply the word value. Next, the lack of closing tags on the options makes the browser work a little hard because it must decide what actually belongs in each option tag.

Using a more strict form of HTML would remove this need for the browser to make extra decisions on the fly:
Code:
<select name=&quot;selColors&quot;>
   <option value=&quot;red&quot;>Red</option>
   <option value=&quot;blue&quot;>Blue</option>
   <option value=&quot;green&quot;>Green</option>
</select>
In this we assume the document started with an XHTML declaration. The browser then knows that all attributes will have their values surrounded in quotes, that all tags will have an end tag to allow easier parsing, because with end tags the document can be rendered more easily into a document object using the document object model (think of a tree model). Since their will be little to no decisions to make with the content based on later content, the document can be rendered with ease.

I would suggest that any web developer these days should work with XHTML. It is no harder than HTML except that you have to learn to work with stricter rules. The w3c provides a document validator from their website that will valdate an XHTML document, and later as browsers move on the trend will eventually end in a state where browsers only read XHTML (as opposed to reading HTML or XHTML).

-Tarwn

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Hi Tarwn,

This is quite informative to me. Thanks for your time :)

Now I will go with XHTML.

The new question is .. Is there any preferable editor for this which is better than the other ?

The HTML-Kit seems OK and easy to convert.

Does EditPlus has similar feature as it does for HTML.? I am not able to see XHTML in that, though the hand written code can be generated on that. The advantage of the editor guiding us with intelisense is preferable. HTML-Kit has an easy provision to transfer the hand code into reasonably checked XHTML code and save that as the final file. This is an edge over EditPlus, unless I am unaware of some settings in EditPlus. :)

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
I third that. I just went to w3schools to learn about XHTML, there isn't a whole lot about it, just more acurate HTML with a few exceptions. I picked it up in about 5-10 minutes. I wasn't sure how intense it was going to be, thought it would be more like XML with alot more to learn.

Thanks Tarwn! :)

relax.gif


Keep up to date with my 2003 NHL Playoffs Wallpaper
 
There is a &quot;close HTML tag automatically&quot; option in the general preferences for editplus...I would be surprised if there wasn't a way to validate XHTML with either a user tool or something similar. As far as it generating xhtml from html, again I am not aware of the option, but haven't looked for anything like that.
Of course with the 100 user tool slots it wouldn't be difficult to find a command line tool that did either validation or reformulation of a document and bind them to your user tool to act on the active document.

-Tarwn

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
ramani, with HTML-Kit you can set up your basic template in XHTML Transitional so every time you start a new document you will automatically start with xhtml DTD etc.
you can also define the auto complete functions to write everything in XHTML standard





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top