Syntax of Java
Syntax of Java
<html>
<head>
</head>
<body>
</body>
</html>
DOCTYPES
If
youve
looked
at
HTML
pages
before,
youve
probably
noticed
a
long,
somewhat
intimidating
tag
just
before
the
opening
HTML
tag.
This
is
a
doctype
declaration
and
its
a
very
important
(but
often
misunderstood)
component
of
HTML
pages.
Essentially,
it
tells
the
user
agent
parsing
your
page
which
version
of
HTML
(or
XHTML)
to
expect,
so
that
it
knows
which
syntax
rules
to
use
when
rendering
your
page.
The
doctype
you
use
should
be
based
on
the
version
of
HTML
youre
using
to
author
the
page.
While
that
all
sounds
good
in
theory,
in
reality
most
of
the
time
a
doctype
is
simply
triggering
standards-mode
rather
than
quirks
mode
(based
on
older
browsers
non-standard
way
of
rendering
pages).
For
that
reason
alone,
all
HTML
documents
should
be
preceded
by
a
doctype
declaration.
For
more
information
on
doctypes,
and
the
history
behind
them,
check
out
Mark
Pilgrims
excellent
section
on
doctypes
from
his
Dive
Into
HTML5
book.
(http://diveintohtml5.info/semantics.html#the-doctype)
Sectioning
content
When
marking
up
documents,
its
natural
to
have
sections
of
content
that
are
defined
separately
from
each
other
in
way
that
describes
the
relationship
of
that
content.
Element
attributes
Some
elements
can
be
enhanced
through
the
use
of
attributes.
Attributes
allow
you
to
provide
more
information
or
additional
functionality
to
the
content.
Attributes
are
added
to
the
opening
tag
of
an
element
and
consist
of
two
parts,
the
name
and
value.
Although
the
syntax
varies
based
on
the
version
of
HTML
youre
using,
its
standard
practice
to
put
values
within
quotation
marks.