Difference between HTML & XHTML

The most important difference between two markup language is:

HTML(Hypertext markup language)  is an application of SGML(standard generalized  markup language) & allow author to omit certain tags and use attribute minimization.

XHTML(Extensible  HTML )  is an application of XML.It doesn’t  permit permission of any tags or use of attribute minimization.

however ,XHTML provides the shorthand notation for empty tags – for eg. <br/> insteda of  <br></br> – which HTML doesn’t  allow.

Whenever we are using CSS , there are three areas in which difference between HTML & XHTML affect.

1. Case Sensitivity

In HTML , <br/> is same as <BR/> or <h1></H1> is perfectly fine, but in XHTML it won’t work.

Because XML parser are case sensitive.

2. optional tags

In HTML, <html><head><body><tbody> all four are optional ones but in XHTML they are not optional ones except <tbody>.

3.properties for root element.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: