In this topic we discuss the main difference between the HTML(Hyper Text Markup Language) and XHTML( eXtensible Hyper Text Markup Language). Also we will compare them according various features supported by them.
XHTML:
XHTML:
- XHTML requires syntax rule while writing.
- Less number of document are present in the web, so some older browser have problem with some part of XHTML.
- It is case sensitive.
ex: <p> hello </p> op: ->hello
Here in this example tag should be used in small case only.
- Order of closing tag should be strictly followed.
ex:
<html>
<body>
<title> Hello World </title>
<body>
<h1>How are you</h1>
</body>
output:
How are you
- Quoting the attribute is compulsory. i.e: All the attributes we declare should be within the double quote.
ex:
<table border="0">
- Explicit attributes are required.
HTML:
- HTML don't have any rules and it is easier to write.
- Huge number of document are present in the web, so we can use it in future.
- It is not case sensitive.
ex:<p> hello </p> OR <P> hello </P> op:->hello
Here either we can use small case or large case in declaring tag.
- Order of closing tag not followed.
ex:
<html>
<body>
<title> Hello World </title>
<body>
<h1>How are you
</body>
</h1>
output:
How are you
- Attribute quoting not required.
ex:
<table border=0>
- Explicit attribute are not required.
do you have anything to add or ask any questions related to this topic? If so, let us know in the comments!
No comments:
Post a Comment