03 Introduction to HTML
03 Introduction to HTML
Introduction to HTML
History of HTML
test.html
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
<!DOCTYPE HTML>
Opening tag
<html>
<head>
<title>My First HTML Page</title>
</head>
<body> Closing tag
<p>This is some text...</p>
</body>
</html>
An HTML element consists of an opening tag, a closing tag and the content
inside.
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
HTML body
• Hyperlink Tags
<a href="http://www.telerik.com/"
title="Telerik">Link to Telerik Web
•site</a>
Image Tags
<img src="logo.gif" alt="logo" />
• Text formatting tags
This text is <em>emphasized.</em>
<br />new line<br />
This one is <strong>more
emphasized.</strong>
CT053-3-1-FWDD HTML (part 1)
Some Simple Tags – Example
some-tags.html
<!DOCTYPE HTML>
<html>
<head>
<title>Simple Tags Demo</title>
</head>
<body>
<a href="http://www.telerik.com/" title=
"Telerik site">This is a link.</a>
<br />
<img src="logo.gif" alt="logo" />
<br />
<strong>Bold</strong> and <em>italic</em> text.
</body>
</html>
CT053-3-1-FWDD HTML (part 1)
Some Simple Tags – Example (2)
some-tags.html
<!DOCTYPE HTML>
<html>
<head>
<title>Simple Tags Demo</title>
</head>
<body>
<a href="http://www.apu.edu.my/" title=
“APU Website">This is a link.</a>
<br />
<img src=“apu_logo.png" alt="logo" />
<br />
<strong>Bold</strong> and <em>italic</em> text.
</body>
</html>
CT053-3-1-FWDD HTML (part 1)
Tags Attributes
<div style="background:skyblue">
This is a div</div>
</body>
</html>
CT053-3-1-FWDD HTML (part 1)
Headings and Paragraphs – Example (2)
headings.html
<!DOCTYPE HTML>
<html>
<head><title>Headings and
paragraphs</title></head>
<body>
<h1>Heading 1</h1>
<h2>Sub heading 2</h2>
<h3>Sub heading 3</h3>
<div style="background:skyblue">
This is a div</div>
</body>
</html>
CT053-3-1-FWDD HTML (part 1)