Jump to content

What is the difference between XML and HTML tags?


SubhanUllah

Recommended Posts

XML doesn’t tolerate syntax errors. HTML does, with specifications on to correct them.

XML tags have to be closed. They can auto-close, like <stuff/> which is equivalent to <stuff></stuff>. HTML tags that are meant to be empty, don’t need a syntax that closes them.

XML tags’ attribute values have to be quote. It’s <a thing="stuff"> or <a thing='stuff'> but not <a thing=stuff>

XML tags don’t tolerate < other than to open a tag. If you want the text < in XML you need &lt; . In HTML you can use < if it doesn’t look like a correct tag opening.

That’s just the obvious. There are many others.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...