0-Intro To Web
0-Intro To Web
What is Markup?
• Markup is information added to a document that enhances its
meaning in certain ways, in that it identifies the parts and how they
relate to each other.
• More specifically, a markup language is a set of symbols that can be
placed in the text of a document to demarcate and label the parts of
that document.
XML
• XML (eXtensible Markup Language) is also used to create web pages and
web applications.
• It is dynamic because it is used to transport the data not for displaying the
data.
• The design goals of XML focus on simplicity, generality, and usability across
the Internet.
• It is a textual data format with strong support via Unicode for different
human languages.
• Although the design of XML focuses on documents, the language is widely
used for the representation of arbitrary data structures such as those used
in web services.
XML Example
<?xml version = "1.0"?>
<contactinfo>
<address category = “university">
<name>LGU</name>
<College>Lahore Garrison University</College>
<mobile>123456789</mobile>
</address>
</contactinfo>
HTML
• HTML (Hyper Text Markup Language) is used to create web pages and
web applications. It is a markup language.
• By HTML we can create our own static page.
• It is used for displaying the data not to transport the data.
• HTML is the combination of Hypertext and Markup language. Hypertext
defines the link between the web pages.
• A markup language is used to define the text document within tag
which defines the structure of web pages.
• This language is used to annotate (make notes for the computer) text so
that a machine can understand it and manipulate text accordingly.
HTML Example
<!DOCTYPE html>
<html>
<head>
<title>LGU</title>
</head>
<body>
<h1>Lahore Garrison University</h1>
</body>
</html>
HTML vs XML
HTML XML
HTML stands for Hyper Text Markup Language. XML stands for extensible Markup Language.
HTML is static. XML is dynamic.
HTML is a markup language. XML provides framework to define markup languages.
HTML can ignore small errors. XML does not allow errors.
HTML is not Case sensitive. XML is Case sensitive.
HTML tags are predefined tags. XML tags are user defined tags.
There are limited number of tags in HTML. XML tags are extensible.
HTML preserve white spaces. XML does not preserve white spaces.
HTML tags are used for displaying the data. XML tags are used for describing the data not for
displaying.
In HTML, closing tags are not necessary. In XML, closing tags are necessary.
HTML is used to display the data. XML is used to store data.
HTML does not carry data it just display it. XML carries the data to and from database.
XHTML
• Extensible HyperText Markup Language (XHTML) is an extension of
HTML and XML, also featuring combined specifications from both.
• This markup language is also used to create and display web pages.
• It was developed by the World Wide Web Consortium (W3C) and was
released in 2000.
• With a well-structured, consistent format, XHTML pages can also be
easily edited and formatted and easily maintained.
HTML5
• HTML5 is a newer version of the HyperText Markup Language (HTML)
and is considered as an extension of Standard Generalized Markup
Language (SGML).
• HTML5 enables JavaScript operations and is used in web page
creation and links them from one to the other.
• It is a widely used markup language on the internet.
XHTML vs HTML5
XHTML HTML5
Extensible HyperText Markup Language Later version of HyperText Markup Language
More extensive doc Much simple than XHTML
Every element should have the corresponding ending Closing tag can be omitted if required
tag
No tags are used for header, footer, section, article, Tags are used for header, footer, section, article, and
nav, and divs with classes; instead, ids have to be used nav, thus making it easier to write and read code
Is case-sensitive Not case-sensitive
Does not support any Geo-Location API Includes an API that enable the users to share their
location
Internet Explorer 8 Browser does not support this Is compatible with all browsers
Better suited for desktop computers More compatible with mobile devices smartphones
and tablets
HTML vs HTML5
HTML HTML5
HyperText Markup Language (HTML) is the standard HTML5 is a markup language that is the fifth and latest
markup language for creating, structuring, and major version of HTML. It includes newly added
displaying web pages. features, tags, and elements.
HTML does not provide native audio and video HTML5 provides native audio and video support.
support.
HTML only supports vector graphics if used in HTML5 supports SVG (Scalable Vector Graphics),
conjunction with different technologies like Flash, Canvas, and other virtual vector graphics.
VML, or Silverlight.
HTML allows it with restricted use. HTML5 allows it.
HTML doesn’t allow users to draw shapes such as HTML allows users to draw shapes such as circles,
circles, triangles, and rectangles. triangles, and rectangles.
HTML vs HTML5
HTML HTML5
HTML only uses browser cache and cookies to store HTML5 uses web SQL databases, local storage, and
data temporarily. application cache for storing data temporarily.
JavaScript and browser interface run in the same JavaScript and browser interface run in separate
thread. threads.
Longer document type declaration. Shorter document type declaration.
Longer character encoding declaration. Uses the ASCII Shorter character encoding declaration. Uses the UTF-
character set. 8 character set.
Compatible with almost all browsers. Only compatible with newer browsers, considering
there are many new tags and elements which only
some browsers support.
Built based on (SGML). No. This means it has improved parsing rules providing
enhanced compatibility.
HTML vs HTML5