HTML (HyperText Markup Language) is the standard language used to create web pages. It structures the content of a webpage using tags (like p, h1, img, etc.).
-
!DOCTYPE html → tells the browser it’s HTML5.
-
html → root element of the page.
-
head → contains meta info (title, links, etc.).
-
title → name that shows in the browser tab.
-
body → main content (text, images, links, etc.). .
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
<h1>wellcome to computer science federal polytechnic bida</h1>
<h2>The school that made the lion bark</h2>
<h3>smaller</h3>
<h4>smaller</h4>
<h6>smallest</h6>
<p>thanks for coming</p>
<style>
p{
font-weight: bold;
}
</style>
</head>
<body>
<img src="images/IMG-20250308-WA0073.jg" alt="NO IMAGE">
</body>
</html>- Headings: html has up to six heading types with each having distinct size.
<h1>Main Heading</h1>
<h2>Sub Heading</h2>- Paragraph: the
tag defines a paragraph.
This is a paragraph of text.
- Links: defines a link, 'href' defines the location of the link, and 'visit Google' represents or contain the link in the browser.
<a href="https://google.com">Visit Google</a>- Images: images are called using the
tag, 'src' is the source of the image, and 'width=200' represent the size of the image in pixel
<img src="image.jpg" alt="Description" width="200">- Tables:
<table border ="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Victor</td>
<td>20</td>
</tr>
</table>- An HTML table is made up of: table → defines the table. tr → defines a row. th → defines a header cell (bold & centered by default). td → defines a data cell (normal text).