What is an HTML explain?
HTML stands for Hyper Text Markup Language. HTML is the standard markup language for creating Web pages. HTML describes the structure of a Web page. HTML consists of a series of elements. HTML elements tell the browser how to display the content.
A basic HTML example :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 20px;
}
h1 {
color: #333;
}
p {
line-height: 1.6;
}
</style>
</head>
<body>
<h1>Welcome to My Blog</h1>
<p>This is my first blog post. I’m excited to share my thoughts and ideas with you!</p>
<h2>About Me</h2>
<p>I am a web developer who loves coding and learning new technologies.</p>
<h2>My Interests</h2>
<ul>
<li>Web Development</li>
<li>Photography</li>
<li>Traveling</li>
</ul>
<p>Feel free to <a href="https://example.com">visit my website</a> for more updates!</p>
</body>
</html>
Breakdown:
<!DOCTYPE html>: Declares the document type.
<html>: The root element.
<head>: Contains meta-information and the title of the page.
<body>: Contains the content of the page.
<h1>,<h2>: Headings for organizing content.
<p>: Paragraphs of text.
<ul>: An unordered list for items.
<a>: A hyperlink to another page.
Categories: