1 HTML
1 HTML
1 HTML
Mark-up Language
• Markup languages are designed for the processing, definition and
presentation of text. The language specifies code for formatting, both
the layout and style, within a text file.
• The code used to specify the formatting are called tags.
• It is human-readable, meaning markup files contain standard words,
rather than typical programming syntax.
• While several markup languages exist, the two most popular
are HTML and XML.
Difference between HTML and XML
HTML XML
HTML is a markup language used for creating webpages. The XML is used for storing structured data, rather than formatting
contents of each webpage are defined by HTML tags. Basic information on a page. While HTML documents use
page tags, such as <head>, <body>, and <div> define sections predefined tags (like the examples above), XML files use
of the page, while tags such as <table>, <form>, <image>, custom tags to define elements. For example, an XML file that
and <a> define elements within the page. stores information about computer models may include the
following section:
• HTML 5 language has a "custom" HTML syntax that is compatible with HTML 4
and XHTML1 documents published on the Web, but is not compatible with the
more esoteric SGML features of HTML 4.
• HTML 5 does not have the same syntax rules as XHTML where we needed lower
case tag names, quoting our attributes, an attribute had to have a value and to close
all empty elements.
• HTML5 comes with a lot of flexibility and it supports the following features −
• Uppercase tag names.
• Quotes are optional for attributes.
• Attribute values are optional.
• Closing empty elements are optional.
The DOCTYPE
• DOCTYPEs in older versions of HTML were longer because the HTML language was SGML
based and therefore required a reference to a DTD.
• HTML 5 authors would use simple syntax to specify DOCTYPE as follows −
• <!DOCTYPE html>
• The above syntax is case-insensitive.
About HTML 5
• HTML5 supports both audio and video whereas none of these was a part of
HTML
• HTML does not allow JavaScript to run within the web browser whereas
HTML5 provides full support for JavaScript to run in the background.
• In HTML5, inline MathML and SVG can be used in text whereas this
wasn’t possible in HTML.
• HTML5 supports new kinds of form controls, for example: dates and times,
email, number, range, tel, url, search etc.
• There are many new elements introduced in HTML5. Some of the most
important ones are: summary, time, audio, details, embed, figcaption, figure,
footer, header, article, canvas, nav, output, section, source, track, video, etc..
Next Topic
Meta Tags