HTML (HyperText Markup Language) is the backbone of the web. It is the standard language used to create and design web pages. In this tutorial, we will explore the basics of HTML to get you started on your web development journey.
HTML is a markup language used to structure content on the web. It consists of a series of elements represented by tags that define different parts of a webpage.
Here is the basic structure of an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>This is a paragraph of text.</p>
</body>
</html>
Explanation:
<!DOCTYPE html>
: Declares the document type as HTML5.<html>
: The root element that contains all HTML content.<head>
: Contains metadata like the title and links to stylesheets.<body>
: Contains the visible content of the webpage.Here are some commonly used HTML tags:
<h1> to <h6>
: Headings of different sizes.<p>
: Paragraphs.<a href="url">
: Links.<img src="image.jpg" alt="description">
: Images.<ul> <li>
: Unordered lists.<ol> <li>
: Ordered lists.To create your first HTML page:
.html
extension (e.g., index.html
).Explore more HTML elements and practice creating different web pages. HTML is the first step in web development, and mastering it will pave the way for learning CSS and JavaScript. Happy coding! If you want to learn more about html you can start learning about forms!