PDF

Introduction to HTML

HTML, or HyperText Markup Language, is the standard language used to create and design web pages. If you're 18 years old and just starting to explore web development, this guide will help you understand the basics of HTML step by step.

What is HTML?

HTML stands for HyperText Markup Language. It structures the content on the web. Think of HTML as the skeleton of a web page, where different components are arranged neatly.

Basic Structure of an HTML Document

Every HTML document has a basic structure. Here’s how it looks:

<!DOCTYPE html>  
<html>  
<head>  
    <title>My First Webpage</title>  
</head>  
<body>  
    <h1>Welcome to My First Webpage!</h1>  
    <p>This is my first paragraph.</p>  
</body>  
</html>

Here’s a breakdown of the main components:

  • <!DOCTYPE html>: This declaration defines the document type and version of HTML.
  • <html>: This tag opens the HTML document.
  • <head>: Contains meta-information about the document, like its title.
  • <title>: Displays the title of the web page in the browser tab.
  • <body>: Contains the main content of the web page that users will see.

Common HTML Tags

Here are some essential HTML tags you should know:

  • <h1> to <h6>: Heading tags, with <h1> being the largest and <h6> the smallest.
  • <p>: Defines a paragraph.
  • <a>: Creates hyperlinks. For example, <a href='https://www.example.com'>Visit Example</a>.
  • <img>: Embeds images, like <img src='image.jpg' alt='Description'>.

Creating Your First Web Page

Now that you know the basic components and tags, let's create a simple web page. Follow these steps:

  1. Open a text editor (like Notepad or Visual Studio Code).
  2. Copy the basic HTML structure provided earlier.
  3. Save the file with a .html extension (like myfirstwebpage.html).
  4. Open the file in your web browser to see your first web page!

Conclusion

Congratulations on taking your first step into web development! HTML is your starting point to learning how to create and design web pages. Practice using different tags and attributes to get comfortable. As you progress, you can explore CSS and JavaScript to enhance your web pages further.

Happy coding!


Ask a followup question

Loading...