HTML Concepts
HTML Documents
•HTML
documents contain HTML tags and plain text
•HTML
documents are also called web pages
Hyper Text
•A
method by which you move around on the web - by clicking on special text
called hyperlinks which bring you to the next page.
•You
can go to any place on the Internet whenever you want by clicking on links
•There
is no set order to do things in.
Markup
•It
is what HTML tags do to the text inside them. They mark it
as a certain type of text .
HTML
Tags
•HTML markup
tags are
usually called HTML tags
•
•HTML
tags are keywords (tag names) surrounded by angle brackets like
<html>
•HTML
tags range from formatting commands to controls that allow user input
•HTML
tags normally come
in pairs like
<b> and </b>
–The
first tag in a pair is the start tag, the
second tag is the end
tag
–The
end tag is written like the start tag, with a forward
slash before
the tag name
–Start
and end tags are also called opening tags and closing
tags
–
•Example
<tagname> content </tagname>
HTML
ELEMENTS
•"HTML
tags" and "HTML elements" are often used to describe the same
thing.
•But
strictly speaking, an HTML element is everything between the start tag and the
end tag, including the tags
•Example:
<p>This is a paragraph.</p>
HTML
vs
X HTML
HTML
•HTML
is an application of SGML (Standard Generalized Markup Language)
•Allows
an author to omit certain tags and use attribute minimization
X HTML
•The
Extensible Hyper Text Markup Language, or
X HTML, is an application of XML (Extensible Markup
Language)
•It
doesn’t permit the omission of any tags or the use of attribute minimization
•
•Basically, X HTML is HTML (all the html tags are found in X HTML) that follows the rules of XML
(because it is a family of XML).
•For
example, while <br>
is valid in HTML, it would be required to write <br
/> in X HTML.
XHTML
l All
tags must be in lower
case
l All
documents must have a doc type
l All
documents must be properly
formed
l All
tags
must be closed
l All
attributes must
be added properly
l Attributes
cannot
be shortened
l All
tags must
be properly nested
The
<!DOCTYPE> Declaration
•The <!DOCTYPE>
declaration
tells browser that this is an HTML page.
•There
are many different documents on the web, and a browser can only display an HTML
page 100% correctly if it knows the HTML type and version used.
•HTML5
Example:
<!DOCTYPE
html>
No comments:
Post a Comment