Introduction to HTML
What is HTML
HTML – Hyper Text Markup Language
It describes the structure of Web
pages using markup.
HTML elements are the building
blocks of HTML pages and are
represented by tags.
How does HTML fit in?
HTML Tags
HTML tags are element names surrounded by angle brackets:
HTML tags normally come in pairs like <p> and </p>
The first tag in a pair is the start tag, the second tag is the
end tag
The end tag is written like the start tag, but with a forward
slash inserted before the tag name
Some tags do not require opening and closing tags which are
called Empty Element
HTML Structure
Basic HTML Tags
<p> “your text here” </p> - creates a
paragraph
<b> “your text here” </b> - specifies bold text
<br> - page break/enter
<center> “text here” </center> - moves the
text to the center
<hr> - creates a horizontal line
<i> “your text here” </i> - specifies italic text
<marquee> “Text Here” </marquee> - creates
a scrolling marquee
<u> “Text Here” </u> - specifies underlined
text
Basic HTML Tags
<strike>”Text here”</strike> - displays a thin
line through the text
<big> “Text Here” </big> - displays the text
one font size larger than the surrounding text
<small> “Text Here” </small> - opposite of
<big>
<h“1-6”> “Text Here” </h“1-6”> - creates
headers
HTML attributes
An attribute is used to define the
characteristics of an HTML element and is
placed inside the element's opening tag. All
attributes are made up of two parts: a name
and a value:
Sample of how Attributes are used
Most common attributes
Tags that need attributes
<a href=“URL”> “text here”</a> - Creates a
hyperlink
• For accessing files locally, use <a href=“file:///FILE
LOCATION”>
<img src=”URL” height=“number”
width=“number”/> - adds an image to the
website
• For accessing images locally, use <img src=“file:///FILE
LOCATION”
<font face=“font” color=“#RGB”
size=“number”>“text here”</font> - edits the
font style