Understand the document
HTML means HyperText Markup Language. It describes what content means and how it is organized. A heading, a paragraph, and a link have different jobs. CSS changes appearance; JavaScript adds behavior. You can make a useful document before adding either.
A tag is the notation, such as <p>. An element includes the opening tag, the content, and usually a closing tag: <p>Hello</p>. The slash marks the closing tag. Nesting means putting one element inside another. Close the inner element before closing its parent.
The doctype tells the browser to use modern HTML standards mode. The html element contains the document. Its lang attribute declares the language of the content, helping screen readers choose pronunciation. Attributes are extra information written inside an opening tag.
Worked example
<!doctype html>
<html lang="en">
<head>...</head>
<body>...</body>
</html>Why it works: A predictable document structure makes your page easier to understand and maintain.
Pause and explain it yourself
In <p>Hello</p>, which part is the content and which part closes the element?
Compare your reasoning
Hello is the content. </p> is the closing tag. The entire expression is one paragraph element.