Welcome to the world of web development! This first module will introduce you to the very basics of HTML, the language that forms the backbone of every website you visit.
What is HTML?
HTML stands for HyperText Markup Language. Let's break that down:
- HyperText: This refers to text that contains links to other texts. The ability to link pages together is the foundation of the World Wide Web.
- Markup Language: This means that HTML uses "tags" to "mark up" or describe the content of a web page. These tags tell the web browser how to display the content, such as identifying headings, paragraphs, images, and more.
In simple terms, HTML is the standard language used to create and structure the content of a web page. It's the skeleton that gives a website its form.
The History and Evolution of HTML
HTML was created by Tim Berners-Lee in 1991. The first version was very simple. Over the years, it has gone through several versions, with each one adding new features and capabilities. The current standard is HTML5, which introduced many new elements for better structuring web pages, handling multimedia, and more.
The Roles of HTML, CSS, and JavaScript
Think of building a website like building a house:
- HTML (The Skeleton): As we've discussed, HTML provides the basic structure and content of the website. It's the foundation and the framework.
- CSS (The Interior Design): CSS, or Cascading Style Sheets, is used to style the HTML content. It controls the colors, fonts, layout, and overall visual presentation. If HTML is the skeleton, CSS is the skin, hair, and clothing.
- JavaScript (The Functionality): JavaScript is a programming language that brings interactivity to a website. It handles things like animations, form validations, and dynamic content updates. It's what makes the house "smart" – allowing you to open doors, turn on lights, and interact with it.
In this course, we will focus exclusively on HTML. Once you have a strong foundation here, you can move on to learning CSS and JavaScript.
Setting Up Your Development Environment
To start writing HTML, you only need two things:
-
A Text Editor: This is where you will write your code. While you could use a simple program like Notepad (Windows) or TextEdit (Mac), it's highly recommended to use a more powerful, free text editor designed for coding. Popular choices include:
- Visual Studio Code (VS Code): A very popular and feature-rich editor.
- Sublime Text: A lightweight and fast editor.
- Atom: A modern and customizable editor.
-
A Web Browser: This is what you will use to view your HTML files. You already have one! Common browsers include:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Safari
Creating Your First HTML File
Let's create your very first web page!
-
Open your text editor.
-
Type the following code:
<!DOCTYPE html> <html> <head> <title>My First Web Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is my first paragraph.</p> </body> </html> -
Save the file:
- Go to "File" -> "Save As...".
- Name the file
index.html. It is a common convention to name the main page of a websiteindex.html. - Make sure to save it with the
.htmlextension.
-
View your page:
- Navigate to where you saved the file on your computer.
- Double-click the
index.htmlfile. It should open in your default web browser, and you will see "Hello, World!" as a large heading and "This is my first paragraph." as text.
Congratulations! You have just created your first web page. In the next module, we'll break down what all of that code actually means.
