You are on page 1of 23

INTRODUCTION

TO
HTML

Mr. Alex M. Custodio


Brief History
 Tim Berners – Lee
- Who pioneered the use of
hypertext for sharing information,
created the first web browser named
World Wide Web in 1990 and
introduced it to colleagues at CERN in
March 1991.

Mr. Alex M. Custodio


An HTML Element is an individual
component of an HTML document or
web page, once this has been parsed
into the Document Object Model.
HTML is composed of a tree of HTML
elements and other nodes, such as text
nodes. Each element can
have HTML attributes specified.

Mr. Alex M. Custodio


HTML Element

Mr. Alex M. Custodio


HTML Basic Structure
HTML the first and last tags in a
document should always be the html
tags.
<html> </html>
HEAD – contains all of the document’s
header information.
TITLE – This container is placed within
the head structure. The document titles
should be placed between the title tags.
Mr. Alex M. Custodio
BODY – comes after the head structure.
Between the body tags, you find all of the stuff
gets displayed in the browser window.
***
<html>
<head>
<title> Document Title </title>
</head>
<body>
</body>
</html>
Mr. Alex M. Custodio
Basic Tags
HEADINGS are defined with the <h1> to <h6>.
<h1> defines as the largest heading.
<h6> defines as the smallest heading.
PARAGRAPH are defined with the <p> tag.
<p> This is a paragraph </p>
LINE BREAKS
<br> tag is used when you want to end a
line.
* The <br> tag is an empty tag. It has no
closing tag.
Mr. Alex M. Custodio
Basic Tags

COMMENT TAGS
* If you want to leave yourself
notes in an HTML document, but don’t
want those notes to show up in the
browser window, you need to use the
comment tag.
<!– Hi, I’m a comment. -->
Mr. Alex M. Custodio
Text Formatting Tags
<b> - defines as bold text
<big> -defines big text
<em> - defines emphasized text
<i> - defines italic text
<small> - defines small text
<strong> - defines strong text
<sub> - defines subscripted text
<sup> - defines superscripted text
<ins> - defines inserted text
Mr. Alex M. Custodio
The HTML <font> tag
<font color=“red”> Sample Text </font>
The Image Tag and the Src Attribute
In HTML, images are defined with the
<img> tag.
The <img> tag is empty, which means
that it contains attributes only and has no
closing tag.
<img src=“url”>
* URL points to the location where the
image is stored.
Mr. Alex M. Custodio
The Alt Attribute
The ALT Attribute is used to define an
“altenate text” for an image.
<img src=“boat.gif” alt=“Big Boat”>
The Background
The <body> tag has two attributes where
you can specify backgrounds. The background
can be a color or an image.
* bgcolor
The bgcolor attributes specifies a
background-color for an HTML page.
Mr. Alex M. Custodio
The value of this attribute can be a
hexadecimal number, an RGB value, or a color
name:
<body bgcolor=“#000000”>
<body bgcolor=“rgb(0,0,0)”>
<body bgcolor=“black”>

* Background
- The Background attributes specifies a
background-image for an HTML page.

Mr. Alex M. Custodio


The value of this attribute is the URL of the
image you want to use.
<body background=“clouds.gif”>
<body background=
http://www.w3schools/clouds.gif>

The Anchor Tag and the Href Attribute


HTML uses the <a> (anchor) tag to create
a link to another document. An anchor point to
any resource on the Web: an HTML page, an
image, a sound file, a movie, etc.

Mr. Alex M. Custodio


The syntax of creating an anchor:
<a href=“url”> Text to be displayed </a>
The <a> tag is used to create an anchor to link
from, the href attributes is used to address the
document to link to, and the words between the
open and close of the anchor tag will be
displayed.
The Target Attribute
You can define where the linked document
will be opened.
<a href=http://www.w3schools.com/
target=“blank”> Visit W3Schools! </a>
Mr. Alex M. Custodio
The Anchor Tag and the Name Attribute
The name attribute is used to create a
named anchor. When using named anchors we
can create links that can jump directly into a
specific section on a page, instead <a
href=“url”> Text to be displayed </a> of letting
the user scroll around to find what he/she is
looking for.
<a name=“label”> Text to be displayed </a>

Mr. Alex M. Custodio


The name attribute is used to create a named
anchor. The name of the anchor can be any text
you care to use.
<a name=“tips”>Useful Tips Section</a>

Unordered List
An unordered list is a list of items. The list
of items are marked with numbers.
An ordered list starts with the <ol> tag. Each list
item starts with the <li> tag.

Mr. Alex M. Custodio


<ul>
<li> Coffee </li>
<li> Milk </li>
</ul>
* Here is how it looks in a browser:
Coffee
Milks

Mr. Alex M. Custodio


Ordered Lists
An ordered list is also a list of item. The list
of items are marked with numbers. An ordered
list starts with the <ol> tag. Each list item starts
with the <li> tag.

Mr. Alex M. Custodio


<ul>
<li> Coffee </li>
<li> Milk </li>
</ul>
* Here is how it looks in a browser:
1. Coffee
2. Milks

Mr. Alex M. Custodio


Definitons Lists
A definition lists is not a list of item. This is
a list of terms and explanations of the terms. A
definition list starts with the <dl> tag. Each
definition-list term starts with the <dt> tag. Each
definition-list definition starts with the <dd> tag.

Mr. Alex M. Custodio


<dl>
<dt> Coffee </dt>
<dd> Black hot drink </dd>
<dt> Milk </dt>
<dd> White Cold drink </dd>
</dl>

Mr. Alex M. Custodio


* Inside a definition-list definition (the <dd> tag)
you can put paragraphs, line breaks, images,
links, other lists, etc.

List Tags
<ol> - Defines an ordered list
<ul> - Defines an unordered list
<li> - Defines a list item
<dl> - Defines a definition list
<dt> - Defines a definition term
<dd> - Defines a definition description
Mr. Alex M. Custodio
THANK YOU!

Mr. Alex M. Custodio

You might also like