17 Feb 2013

HTML XML XHTML


HTML

HTML, an initialism of HyperText Markup Language, is the predominant markup language for web pages. 
It provides a means to describe the structure of text-based information in a document—by denoting certain text as links, headings, paragraphs, lists, etc.—and to supplement that text with interactive forms, embedded images, and other objects. 
HTML is written in the form of "tags" that are surrounded by angle brackets.
HTML can also describe, to some degree, the appearance and semantics of a document, and can include embedded scripting language code (such as JavaScript) that can affect the behavior of Web browsers and other HTML processors.
The Hyper Text Markup Language (HTML) was introduced, under the rules of Standard Generalized Markup Language (SGML) in document type definition (DTD), by Tim Berners-Lee in the year 1991. The SGML is a programming language through which markup languages are developed and its HTML application is a markup of text which uses simple set of tags for the data presentation on WWW (World Wide Web). The term ‘Hyper’ in HTML refers to ‘active’ elements. Elements can be paragraph, heading, tables, rows etc. and is defined under the ‘start’ and ‘end’ tags. The tag used on the HTML is defined as a markup that demarcates its element and has attributes attached to it. Attributes are the values to the tag for the better display of the data. With HTML, the WebPages of any website can be created. With the help of HTML, website designers can embed images, maintain fonts, construct layouts, and set hyperlinks for navigation on their websites.

XML

Extensible Markup Language, a specification developed by the W3C. XML is a pared-down version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enabling the definition, transmission, validation, and interpretation of data between applications and between organizations.
XML (Extensible Markup Language) is a general-purpose specification for creating custom markup languages.
[1] It is classified as an extensible language, because it allows the user to define the mark-up elements. XML's purpose is to aid information systems in sharing structured data, especially via the Internet,
[2] to encode documents, and to serialize data; in the last context, it compares with text-based serialization languages such as JSON, YAML and HTML.

XHTML

The Extensible Hypertext Markup Language, or XHTML, is a markup language that has the same depth of expression as HTML, but also conforms to XML syntax.
While HTML prior to HTML 5 was defined as an application of Standard Generalized Markup Language (SGML), a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML.
Because they need to be well-formed, true XHTML documents allow for automated processing to be performed using standard XML tools—unlike HTML, which requires a relatively complex, lenient, and generally custom parser.
XHTML can be thought of as the intersection of HTML and XML in many respects, since it is a reformulation of HTML in XML. XHTML 1.0 became a World Wide Web Consortium (W3C) Recommendation on January 26, 2000. XHTML 1.1 became a W3C Recommendation on May 31, 2001.



Difference Between HTML and XML

HTML is an abbreviation for HyperText Markup Language while XML stands for eXtensible Markup Language.The differences are as follows:-

1.HTML was designed to display data with focus on how data looks while XML was designed to be a software and hardware independent tool used to transport and store data, with focus on what data is.

2.HTML is a markup language itself while XML provides a framework for defining markup languages.

3.HTML is a presentation language while XML is neither a programming language nor a presentation language.

4.HTML is case insensitive while XML is case sensitive.

5.HTML is used for designing a web-page to be rendered on the client side while XML is used basically to transport databetween the application and the database.

6.HTML has it own predefined tags while what makes XML flexible is that custom tags can be defined and the tags are invented by the author of the XML document.

7.HTML is not strict if the user does not use the closing tags but XML makes it mandatory for the user the close each tag that has been used.

8.HTML does not preserve white space while XML does.

9.HTML is about displaying data,hence static but XML is about carrying information,hence dynamic.

10. HTML is error free language but XML is not error free.

11. In XML parsing is used to execute the XML files but in HTML there is no any facility of Parsing.


Thus,it can be said that HTML and XML are not competitors but rather complement to each other
and clearly serving altogether different purposes.

Difference between HTML and XHTML


HTML
XHTML
Hypertext markup Language.
Extensible  Hypertext markup Language.
HTML is about displaying information.
XHTML is about describing the information.
An application of SGML
An application of xml
Can have empty/open tagse.g. <br>, <p>
All the unclosed tags must be closed e.g. <br/>
No hard rule on structures of the elements e.g. <p><b>The difference</p></b>
Structure of the elements should be followed e.g. <p><b>The difference</b></p>
Attributes have quotes as optional e.g. <font color=#ff0000>
Attributes have quotes mandatory e.g. <font color=”#ff0000″>
Attributes values not significant e.g. <input type=”checkbox” checked>
Attributes values are importante.g. <input type=”checkbox” checked = “checked”>
Case insensitive:The tags and attributes can be of uppercase or lowercase as per the preference
Case sensitive:The tags and attributes must be of lowercase
All the content can be put under body element
All the content has to  be put in blocks (p, under body element



No comments:

Post a Comment











































































































Support From Kuldeep Sheoran