Author |
Topic: html and xml (Read 6470 times) |
|
ashutoshets
Newbie
Gender:
Posts: 14
|
|
html and xml
« on: Mar 10th, 2012, 2:29am » |
Quote Modify
|
What is basic difference between html and xml.
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: html and xml
« Reply #1 on: Mar 10th, 2012, 3:39am » |
Quote Modify
|
XML is stricter and more general. XML describes data, HTML describe content for the web. XML = eXtensible Markup Language HTML = HyperText Markup Language There's also XHTML which is like HTML except it follows the stricter rules of XML; for example that all tags must be closed, so you must use <br /> instead of <br> for linebreaks.
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
cartoonle
Junior Member
Gender:
Posts: 56
|
|
Re: html and xml
« Reply #2 on: Dec 1st, 2012, 11:29am » |
Quote Modify
|
XML is broader term. HTML is language for web page definition based on XML.
|
|
IP Logged |
friv - something i've built
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: html and xml
« Reply #3 on: Dec 1st, 2012, 1:04pm » |
Quote Modify
|
I don't think that's correct. I'm pretty sure HTML existed before XML, so the former couldn't be based on the latter (unless we invent time-travel).
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: html and xml
« Reply #4 on: Dec 3rd, 2012, 1:37am » |
Quote Modify
|
I agree. There first was HTML. Then XML was created with the general syntax of HTML but much stricter. (And there is XHTML which is a HTML ported to the strict syntax of XML.) I think I know better now: There was something called SGML. HTML is an application of SGML for the representation of web pages. XML is an evolution of SGML, simplifying the syntax and adding the semantic of namespaces.
|
« Last Edit: Jan 10th, 2013, 3:00pm by Grimbal » |
IP Logged |
|
|
|
cartoonle
Junior Member
Gender:
Posts: 56
|
|
Re: html and xml
« Reply #5 on: Dec 6th, 2012, 8:24am » |
Quote Modify
|
Well, that that's true, if we are precise. But HTML is very similar to XML, the basic difference is, that HTML is not as strict as XML. Not all tags need to be closed with ending tag and nesting is also not as strict ... and you can still get away with it in HTML. And yes, there's also XHTML which obeys XML strict rules and maintains HTML functionalities. This should be about right now, or?
|
|
IP Logged |
friv - something i've built
|
|
|
rmsgrey
Uberpuzzler
Gender:
Posts: 2873
|
|
Re: html and xml
« Reply #6 on: Dec 7th, 2012, 5:08am » |
Quote Modify
|
HTML has stricter semantics; XML has stricter syntax. With XML, provided your layout is in the correct form, there's no restriction on the actual data. With HTML, you can be sloppier with the format, but only a comparatively narrow range of tags are legal.
|
|
IP Logged |
|
|
|
sc1ndy
Newbie
Gender:
Posts: 10
|
|
Re: html and xml
« Reply #7 on: Jan 8th, 2013, 5:29am » |
Quote Modify
|
HTML is based on XML and has rules of XML + its own so we can say that HTML is more restricted than XML.
|
« Last Edit: Jan 8th, 2013, 5:30am by sc1ndy » |
IP Logged |
|
|
|
rmsgrey
Uberpuzzler
Gender:
Posts: 2873
|
|
Re: html and xml
« Reply #8 on: Jan 9th, 2013, 10:15am » |
Quote Modify
|
on Jan 8th, 2013, 5:29am, sc1ndy wrote:HTML is based on XML and has rules of XML + its own so we can say that HTML is more restricted than XML. |
| HTML predates XML by 6 years, and not all valid HTML is valid XML (in particular, unclosed <br> tags are allowed in HTML but not in XML). Both do derive from SGML, so they're more like siblings than child and parent.
|
|
IP Logged |
|
|
|
Mariko79
Newbie
Better than Van Damme
Posts: 30
|
|
Re: html and xml
« Reply #9 on: Apr 2nd, 2013, 12:42pm » |
Quote Modify
|
Also the XML files is usefull for the crawling the sites by the search engine spiders ( many of search engine allow to submit your site only in XML format)
|
|
IP Logged |
|
|
|
|