How to Use HTML to Create a Web Page
HTML is mainly used to structure our web page with the help of the elements and tags. It can be further used with CSS and JavaScript to enhance the attractiveness and interactivity of the web page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>
My Simple Webpage
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>
Welcome to My Page!
</h1>
<p>
This is some content on my webpage.
</p>
<img alt="My Image" src=
"https://media.w3wiki.org/wp-content/uploads/20240324185837/GFG-logo.jpg">
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
}
h1 {
text-align: center;
color: #333;
}
p {
text-align: center;
line-height: 1.5;
}
img {
width: 200px;
display: block;
margin: 0 auto;
}
ul {
list-style: none;
padding: 0;
}
li {
margin: 10px 0;
}
Output:
Why is HTML used in Web Pages ?
Web pages are built using the HyperText Markup Language or HTML. It is a markup language that defines a webpage’s content and structure using tags. These tags provide instructions to web browsers on how to show links, photos, videos, text, and other content. Consider HTML as a house’s plan, detailing the rooms, doors, windows, and general design.
Table of Content
- Working of HTML
- How to Use HTML to Create a Web Page
- Some Commonly Used HTML Tags
- Advantages of Using HTML in a Webpage
- Latest Version of HTML (HTML5)
- Features of HTML5
- Advantages of HTML5 over HTML