How a web page reaches you
What HTML does
Understand HTML as a markup language that gives content structure and meaning rather than deciding how the page should look.
6 minute lesson
HTML stands for HyperText Markup Language.
It is a markup language. You start with content and mark each part according to what it means.
<h1>My travel notes</h1>
<p>I spent three days in Copenhagen.</p>
The tags tell the browser that the first line is the main heading and the second is a paragraph.
Most elements have an opening tag, some content, and a closing tag:
<p>A paragraph of text</p>
That whole thing is a p element. <p> and </p> are its tags.
Some elements cannot contain content and do not have a closing tag. The image element is one example:
<img src="photo.jpg" alt="A bicycle beside a canal">
HTML is not concerned with how the content looks. You do not use it to say “make this heading blue.” That is CSS’s job.
Instead, HTML answers questions such as:
- Is this text a heading or a paragraph?
- Is this a link?
- Is this a list of related items?
- Is this the main navigation?
Choosing elements for their meaning makes a page easier to use with browsers, search engines, screen readers, and other tools.
Lesson completed