Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it better to use XML instead of HTML to create webpages?

Tags:

html

xml

webpage

I want to create a website. After seach for all the possible technologies i can use for my webpage, i found out that XML is best way to store data. The idea is to keep data and representation seperately. i would use style sheets to give presentation for the webpages.

So is it better to use XML instead of HTML for storing webpages. If yes, then which tool can i use to create my webpages.

like image 645
jsbisht Avatar asked Dec 04 '22 10:12

jsbisht


1 Answers

If you mean you want to output XML and let a browser figure out your XSL... absolutely do not do this.

Use XHTML. It is HTML that conforms to XML specifications as defined by the various DTDs.

Also, you should know that it often isn't practical to totally separate your data (page elements) from your representation. I'm sure 100 people will disagree with me on this, but you should focus your efforts more on building pages that are compatible, accessible, and maintainable (as said by @SHiNKiROU) rather than a perfect separation between page elements and layout/CSS.

Usually, those goals line up with content separation from design, but sometimes they do not.

like image 188
Brad Avatar answered Feb 16 '23 20:02

Brad