You are on page 1of 12

Markup Languages

•SGML - Standard Generalized Markup


Language.

• HTML - Hypertext Markup Language.

•XHTML - Extensible Hypertext Markup


Language.

•XML - Extensible Markup Language.


SGML - Standard Generalized Markup
Language.
An ISO standard for the definition of
markup languages

SGML is a language for defining markup


languages.

HTML is one such "application" of


SGML.
An SGML application consists of several
parts:
1. The SGML declaration: specifies which
characters and delimiters may appear in the
application.
2. The document type definition (DTD):
defines the syntax of markup constructs.
3. A specification that describes the semantics to
be ascribed to the markup.
4. Document instances containing data
(contents) and markup.
HTML - Hypertext Markup Language.
HTML is the standard markup language for
Web pages.
With HTML you can create your own Website.
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to
display the content
HTML pages are saved with .html extension
A Simple HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>


<p>My first paragraph.</p>

</body>
</html>
The <!DOCTYPE html> declaration
defines that this document is an HTML5
document
The <html> element is the root element of
an HTML page
The <head> element contains meta
information about the HTML page
The <title> element specifies a title for
the HTML page
The <body> element defines the
document's body
What is an HTML Element?
An HTML element is defined by a start
tag, some content, and an end tag:
<tagname> Content goeshere... </tagname>

<h1>My First Heading</h1>


<p>My first paragraph.</p>
HTML Page Structure
HTML Editors
A simpletext editor is all you need to
learn HTML.

Notepad or TextEdit
Notepad++
Sublime
Visual Studio
etc…..
XHTML EXtensible HyperText Markup Language

• XHTML is a stricter, more XML-based


version of HTML
• XHTML is HTML defined as an XML
application
XHTML is supported by all major
browsers
Why XHTML?

XML is a markup language where all


documents must be marked up correctly (be
"well-formed").

XHTML was developed to make HTML


more extensible and flexible to work with
other data formats (such as XML).

XHTML comes with a much stricter error


handling.
Most Important Differences from HTML

• <!DOCTYPE> is mandatory
• The xmlns attribute in <html> is mandatory
• <html>, <head>, <title>, and <body>
are mandatory
• Elements must always be properly nested
• Elements must always be closed
• Elements must always be in lowercase
• Attribute names must always be in lowercase
• Attribute values must always be quoted
• Attribute minimization is forbidden

You might also like