HTML Documents
HTML Documents
By
Walujjo stephen
• All HTML documents must start with a document type declaration: <!
DOCTYPE html>.
• The HTML document itself begins with <html> and ends with </html>.
• The visible part of the HTML document is
between <body> and </body>.
Example
•<!DOCTYPE html>
<html>
<body>
</body>
</html>
HTML Headings
•HTML headings are defined with the <h1> to <h6> tags.
•Example
•<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
HTML Links
HTML links are defined with the <a> tag:
•Example
•<a href="https://www.mtac.com">This is a link</a>
•The link's destination is specified in the href attribute.
The source file (src), alternative text (alt), width, and height are
provided as attributes:
Example
<img src="mtac.jpg" alt=“mtac" width="104" height="142">
HTML <button> Tag
•Example
A clickable button is marked up as follows:
<button type="button">Click Me!</button>
Definition and Usage
Example
An unordered HTML list:
• Item
• Item
• Item
• Item
An unordered list starts with the <ul> tag. Each list item starts
with the <li> tag.
The list items will be marked with bullets (small black circles) by
default:
Example
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered HTML List
An ordered list starts with the <ol> tag. Each list item
starts with the <li> tag.
The <dl> tag defines the description list, the <dt> tag defines the
term (name), and the <dd> tag describes each term:
Example
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
HTML List Tags
Tag Description