HTML Introduction
HTML Introduction
HTML Introduction
What is HTML?
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
Example Explained
HTML Tags
Tip: The start tag is also called the opening tag, and the end tag the closing tag.
Web Browsers
The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how to display the document:
● HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
● HTML Paragraphs
● HTML Links
HTML links are defined with the <a> tag: The link's destination is specified in the href attribute. Attributes are
used to provide additional information about HTML elements.
●
●
●
●
● HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
● ● HTML Lists
HTML lists are defined with the <ul> (unordered/bullet list) or the <ol> (ordered/numbered list) tag,
followed by <li> tags (list items):
●
Empty HTML
Elements
HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line break).
● HTML Attributes
Example:
<img src="img_girl.jpg" width="500" height="600">
The value of the attribute can be read by screen readers. This way, someone "listening" to the webpage, e.g. a blind person,
can "hear" the element.
Example:
Example:
<p style="color:red">I am a paragraph</p>
<font></font> Change the font attributes for text within the tags
Style attribute