The structure of an HTML page
Tags, elements, attributes and the skeleton every page needs.
HTML (HyperText Markup Language) describes the content and structure of a page: headings, paragraphs, links, images, lists. The browser reads it and builds the page. HTML is not a programming language, it is a markup language.
Elements, tags and attributes
An element is usually an opening tag, content and a closing tag. Attributes add information inside the opening tag.
<a href="https://learn.appzas.com/">Free courses</a>Here a is the element, href is an attribute and "Free courses" is the content. Some elements have no content and no closing tag, such as <img> and <br>.
The skeleton
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My first page</title>
</head>
<body>
<h1>Hello</h1>
<p>This is a paragraph.</p>
</body>
</html><!doctype html>tells the browser to use modern standards mode.<head>holds information about the page that is not shown: title, character set, links to CSS.<body>holds everything the visitor sees.langhelps screen readers and search engines.
NoteSave the file as index.html and open it in a browser. You do not need a server to start.
Test yourself
Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.