Table of Contents
What is HTML?
HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. HTML tells the browser how to display text, images, links, videos, and other content on a webpage.
Why is HTML Important?
- It’s the foundation of every webpage.
- Every website on the internet uses HTML in some way.
- It works alongside CSS (for styling) and JavaScript (for interactivity).
HTML is Not a Programming Language
HTML is a markup language, not a programming language. It doesn’t contain logic like loops or conditions. Instead, it describes the structure and layout of a document.
Basic HTML Terminology
- Element: A piece of content like
<p>Hello</p> - Tag: The markup that defines the start and end of an element, e.g.,
<p>and</p> - Attribute: Extra info added to a tag, like
href,src, oralt
The Role of a Web Browser
A browser (like Chrome, Firefox, or Safari) reads the HTML file and renders it visually for users. You can even right-click a page and choose “View Page Source” to see its HTML.
Basic HTML Example
<!DOCTYPE html> <html> <head> <title>My First HTML Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is my first web page using HTML.</p> </body> </html>
Try This
Copy and paste the code above into a text editor like VS Code or Notepad, save it with a .html extension, and open it in a browser!
Practice Exercise
Create a simple HTML file that displays:
- A heading saying “Welcome to My Webpage”
- A paragraph introducing yourself
Summary
- HTML structures web content.
- It uses tags and attributes to define elements.
- Browsers render HTML into visual web pages.
