Sie sind auf Seite 1von 26

Introduction

to

HTML

What is HTML?
a computer language, which makes it
possible to present information on the
Internet.
invented in 1990 by a scientist called
Tim Berners-Lee
What you see when you view a page
on the Internet is your browser's
interpretation of HTML

HTML stands for


Hyper opposite of linear
Text self-explanatory
Markup what you do to the
text

Language a computer

What is the use of HTML?


HTML is used to make
websites
What is needed?
a browser
a notepad

HTML tags
Tags are commands used to format or
modify the content of a webpage.
It can be used to format text, add links to
other websites, create lists and other
parts of websites.
Tags are enclosed by brackets, like:
<html>
Generally, there are two kinds of tags opening tags: <html> and closing
tags: </html>

HTML tags
There are four major tags every
HTML document should have:
<html>
o <html>
<head>
o <head>
<title></title>
o <title>
</head>
o <body>
<body>
</body>
</html>

Sections of an HTML
Document

Saving HTML document


In Notepad, choose Save as under
File menu
Save your file with .htm or .html
extension

<html> tag
Placed at the beginning and end of your
document.
Everything in the document goes inside
<html></html>
<html>
<head>
<title>My Page</title>
</head>
<body>Hello World</body>

<head> tag
the cover page of the document.
Just as the cover page of a book
contains information about the book
(such as the title), the <head> section
contains information about the
document.
<html>
<head>
<title>My Page</title>
</head>
</html>

<title> tag
<title> states the title of the
document.
<title> always goes in the <head>
section.
The text inside <title> is not
displayed in the document. However,
most<html>
browsers will display the title at
<head>
the top of
the window.
<title>My Page</title>
</head>
</html>

<body> tag
defines the visible section of the
document
the section that holds everything that is
actually displayed. All the text, headers,
tables, etc. are in this section
<body>
<h1>This is a header</h1>
<p>This is a paragraph</p>
</body>

Heading Tags
Headings briefly describes the topic of
the section it introduces.
There are six levels of headings:
<h1>,<h2>,<h3>,<h4>,<h5>,<h6>
<body>
<h1>This
<h2>This
<h3>This
<h4>This
<h5>This
<h6>This
</body>

is
is
is
is
is
is

header
header
header
header
header
header

1</h1>
2</h2>
3</h3>
4</h4>
5</h5>
6</h6>

Output:

<p> tag
<p> tag offers to create a
paragraph.
<body>
<p>This is paragraph1</p>
<p>This is paragraph2</p>
<p>This is paragraph3</p>
</body>

Output:

Text formatting tags

<b>bold</b>
bold
<i>italic</i>
italic
<u>underline</u>
underline
<center>center</center>
center

<br> tag
It is called a line break tag
Used to display the next text on the another line
It equivalent to what enter key produce

example:
<body>
<p>Hello.<br>
I am Olaf.<br>
Nice to meet you.
</p>
</body>

List tag
Unordered list: <ul></ul>
Ordered list: <ol></ol>

<li> tag
indicates the start of a new line item within a
list.

<body>
<h3>Unordered List</h3>
<ul>
<li>unordered list1</li>
<li>unordered list2</li>
</ul>
<h3>Ordered List</h3>
<ol>
<li>ordered list1</li>
<li>ordered list2</li>
</ol>
</body>

<html>
<head>
<title>My Page</title>
</head>
<body>
<h1><center>Quote for the Day</center></h1>
<p>Don't ever feel bad for <u>making a decision</u> about
<i>your own life</i> that upsets other people.
<br>
You are not responsible for their happiness.
<br>
<b>You're responsible for your own happiness.</b>
</p>
<h2><i>Anyone who wants you to live in misery for their
happiness should not be in your life to begin with.</i>
</h2>
<p>Don't let yourself be controlled by <u>three things:</u></p>
<b>
<ol>
<li>people</li>
<li>money</li>
<li>past experiences</li>
</ol>
</b>
<p>You just have to:</p>
<b>
<ul>
<li>Inhale the FUTURE</li>
<li>Exhale the PAST</LI>
</ul></b>
</body>

Activity

HTML Errors
Quiz

Assignment
Create a simple webpage about you
filename: YourName.html (AnnaLee.html)
titlepage: About Me

Thank you!

Das könnte Ihnen auch gefallen