Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 22

HTML

Chapter 2 Creating a Web Page

Developing a Web Site 1


Objective

 To create the first Web page.

Developing a Web Site 2


Steps to Create a Web Page

1. Add HTML commands (called tags) to


the text file, making it into a Web page. 
2. Save the text file as plain, standard
ASCII text.
3. Always give files containing HTML tags
a name ending in .htm or .html when
you save them.

Developing a Web Site 3


HTML Basic Elements

 In every HTML page, the words starting


with < and ending with > are actually
coded commands.
 These coded commands are called
HTML tags because they "tag" pieces of
text and tell the Web browser what kind
of text it is. This allows the Web browser
to display the text appropriately.

Developing a Web Site 4


HTML Basic Elements - continued

 Most HTML tags have two parts: an


opening tag, to indicate where a piece of
text begins, and a closing tag, to show
where the piece of text ends.
 Closing tags start with a / (forward slash)
just after the < symbol.

Developing a Web Site 5


HTML Basic Elements - continued

 Four basic tags that are required in


every HTML page:
 <HTML>…</HTML>
 <BODY>…</BODY>

 <HEAD>…</HEAD>

 <TITLE>…</TITLE>

Developing a Web Site 6


<HTML>…</HTML>

 Putting <HTML> at the very beginning of


a document simply indicates that this is a
Web page.
 The </HTML> at the end indicates that
the Web page is over.

Developing a Web Site 7


<HEAD>…</HEAD>

 Put <HEAD> in front of the <TITLE> tag


and </HEAD> after the </TITLE> tag.

Developing a Web Site 8


<TITLE>…</TITLE>

 Web browser displays any text between


<TITLE> and </TITLE> at the very top of
the Web browser's window.
 The title text will also be used to identify
the page on the Web browser menu,
whenever someone selects Add
Bookmark or Add to Favorites.

Developing a Web Site 9


<BODY>…</BODY>

 The <BODY> tag tells the Web browser


where the actual body text of the page
begins, and </BODY> indicates where it
ends.
 Everything between the <BODY> and
</BODY> tags will appear in the main
display area of the Web browser
window.

Developing a Web Site 10


Paragraphs and Line Breaks

 When a Web browser displays HTML


pages, it pays no attention to line
endings or the number of spaces
between words.
 It makes no difference how many spaces
or lines you use when typing your text.

Developing a Web Site 11


Paragraphs and Line Breaks -
continued
 Use paragraph tag and line break tag to
solve this problem.
 Paragraphs tag: <P>
 Line break tag: <BR>

Developing a Web Site 12


<P>

 The <P> tag creates a paragraph break.


 <P> inserts an extra blank line between
paragraphs.
 The <P> paragraph tag doesn't require a
closing </P> tag at the end of the
paragraph because a paragraph
obviously ends whenever the next one
begins.

Developing a Web Site 13


<BR>

 The <BR> tag forces a line break.


 <BR> line break tag doesn't need a
closing </BR> tag.

Developing a Web Site 14


Horizontal Rules

 It is used to create a horizontal line in the


Web page.
 Tag: <HR>
 Attributes: width(percent of
window/pixels), size(pixel), align(left,
center or right), color (color name or
color code)

Developing a Web Site 15


<HR>

 The <HR> tag causes a horizontal "rule"


line to appear.
 Inserting a horizontal rule with the <HR>
tag also causes a line break.
 The <HR> horizontal rule tag doesn't
need a closing </HR> tag.
 You can add the attributes into the tag.

Developing a Web Site 16


<HR> - continued

 Examples
 <hr width="50%" size="10" align="right"
color="green“>
 <hr width="50" size=“20" align=“left"
color="#FF00FF“>
 <hr width="50" size=“20" align=“center"
color="#FF00FF“>

Developing a Web Site 17


Heading
 When you browse through Web pages on the
Internet, you notice that most of them have a
heading at the top which appears larger and
bolder than the rest of the text.
 Six header tags:
 <H1>…</H1>
 <H2>…</H2>
 <H3>…</H3>
 <H4>…</H4>
 <H5>…</H5>
 <H6>…</H6>

Developing a Web Site 18


Heading - continued
 <H1>…</H1>
 For a big level 1 heading, put an <H1> tag
at the beginning and an </H1> tag at the
end.
 <H2>…</H2>
 For a slightly smaller level 2 heading, use
<H2> and </H2>.
 <H3>…</H3>
 For a little level 3 heading, use <H3> and
</H3>.
Developing a Web Site 19
Heading - continued

 <H4>…</H4>, <H5>…</H5> and


<H6>…</H6>
 Theoretically, you can also use <H4>,
<H5>, and <H6> to make progressively less
important headings.

Developing a Web Site 20


Comments

 <!-- … --> tag is used to create


comment.

Developing a Web Site 21


Summary

 You should know


 The most basic and important HTML tags.
 How to create a Web page using text editor.

 The usage of paragraphs, horizontal rules,


headings and comments.

Developing a Web Site 22

You might also like