HTML src
Created By: chatGPT
HTML (HyperText Markup Language) is the standard markup language used for creating web pages. It structures the content on the web. Below is a simple example of how to create a basic HTML document. This code includes essential elements such as the
doctype
, html
, head
, and body
sections. The head
section contains meta-information, while the body
hosts the content displayed in the browser.<!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>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<p>This is a simple HTML document.</p>
</body>
</html>
You can enhance your HTML document by adding more elements, such as images, links, and lists. Below is an example demonstrating these components. It showcases how to insert an image and create a hyperlink, making your web page more interactive.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Enhanced HTML Page</title>
</head>
<body>
<h1>Welcome to My Enhanced Web Page</h1>
<p>This is an enhanced HTML document.</p>
<img src="https://via.placeholder.com/150" alt="Sample Image">
<p>For more information, visit <a href="https://www.example.com">this link</a>.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</body>
</html>