|
|
HTML
fundamentals
CHAPTER
# 1
Introduction to Html
- HTML is a markup
Language.
- HTML is invented
by Tim Berners-Lee with colleagues at CERN.
- HTML is a cross-platform
language.
Markup tags
- Element names enclosed
in angle brackets.
- Tags are basic building
blocks of an HTML document.
- Tags also refereed
to as Codes.
- A pair of tags namely
beginning tag and ending tag is called a container tag.
- A tag stands alone
is called a empty tag.
- Tags are not case
sensitive.
<TITLE>
|
TITLE
OF THE PAGE
|
</TITLE>
|
Beginning
Tag
|
|
Closing
Tag
|
|
<LI>
|
AN ITEM IN
A LIST
|
|
Empty Tag
|
|
Basic Structure of
HTML Document
<HTML>
<HEAD>
<TITLE>Basic
structure</TITLE>
</HEAD>
|
HEADING
|
<BODY>
|
BODY
|
THE
ACTUAL BODY
|
</BODY>
|
<HTML>
|
HTML DOCUMENT
|
Block Level Tags
- HTML elements that
affect an entire paragraph is called as block-level elements.
<P>
|
- PARAGRAPH
BREAK
- It is a
container tag
- Contents
are rendered in a new paragraph
- It is preceded
and followed by a line break.
|
<H>
|
- HEADING.
- It is a
container tag.
- The content
is rendered in bold serif font
- There are
6 levels of headings.
- Level 1
is the large and level 6 is the smallest.
- It is preceded
and followed by a line break.
|
<PRE>
|
- PRIMITIVE
FORMATING
- It is a container
tag
- The content
is rendered with all line breaking and spacing as original.
- W3C deprecated
this element.
|
<BLOCKQUOTE>
|
- It is a container
tag.
- The content
is indented from the margins
- W3C deprecated
this element.
|
<CENTER>
|
- It is a container
tag
- The content
is centered in the window.
- 3C deprecated
this element.
|
Text level Elements
- Text-level elements
can affect a text block as small as a single character to as
long as the entire page.
- Though the Phrase
elements <STRONG> and <EM> render the same effects
as the Font elements <B> <I>, they are meant for
future application when HTML is used to render through an audio
equipment.
<B>
|
- It is a container
tag.
- It is font
style element.
- The content
is rendered in block.
|
<I>
|
- It is a container
tag.
- The content
is rendered in italic.
|
<U>
|
- It is a container
tag.
- The content
is rendered with underline.
|
<STRONG>
|
- It is a container
tag.
- It is Phrase
element.
- It is similar
to <B>.
- The content
is rendered stronger relative to the
surrounding text.
|
<EM>
|
- It is a container
tag.
- It is a Phrase
element.
- The content
is rendered in block.
|
Lists
- Used to create bulleted
or numbered lists.
- Lists are of two
type Ordered (Numbered) and Unordered (Bulleted).
|
Ordered
List
|
Unordered
List
|
|
<OL>
<LI>List 1
<LI>List 2
<LI>List 3
</OL>
|
<UL>
<LI>List 1
<LI>List 2
<LI>List 3
</UL>
|
|
The
result of above code
|
The
result of above code
|
- List 1
- List 2
- List 3
|
|
Hidden Comments
- The comments, added
to document the HTML codes, are hidden from rendering to the
browser by using the following syntax.
<!
-- comment text to come here -->
Good Coding
Practice
- When two or more
tags are applied to the same segment, close the first that is
opened last and wise versa.
- Use either lower
case or upper case only for coding.
- Do not use more
than one code in a row as long as they are not applied to the
same segment.
|
|