You now know all of the basic elements and set-up you need to structure an HTML page and add different types of content. With the help of CSS, very soon you’ll be creating beautiful websites!
While some tags have a very specific purpose, such as image and video tags, most tags are used to describe the content that they surround, which helps us modify and style our content later. There are seemingly infinite numbers of tags to use (many more than we’ve taught). Knowing when to use each one is based on how you want to describe the content of your HTML. Descriptive, well-chosen tags are one key to high-quality web development. A full list of available HTML tags can be found in Mozilla documentation.
Let’s review what you’ve learned this lesson:
<!DOCTYPE html>declaration should always be the first line of code in your HTML files. This lets the browser know what version of HTML to expect.
<html>element will contain all of your HTML code.
- Information about the web page, like the title, belongs within the
<head>of the page.
- You can add a title to your web page by using the
<title>element, inside of the head.
- A webpage’s title appears in a browser’s tab.
- Anchor tags (
<a>) are used to link to internal pages, external pages or content on the same page.
- You can create sections on a webpage and jump to them using
<a>tags and adding
ids to the elements you wish to jump to.
- Whitespace between HTML elements helps make code easier to read while not changing how elements appear in the browser.
- Indentation also helps make code easier to read. It makes parent-child relationships visible.
- Comments are written in HTML using the following syntax:
<!-- comment -->.
Take some time to edit the workspace you created and observe how it changes!
Congratulations on completing this lesson!
If you want to review how to use HTML in a project, watch the video below and follow along with one of our experts: