Basic Structure of an HTML document
This article is intended for beginners interested in front-end development work. In this post, we will walk through the basic structure of an HTML document.
What is HTML? HTML stands for HyperText Markup Language. HTML provides structure to content appearing on a webpage through elements.
HTML Element Overview
- HTML element: a unit content in a HTML document formed by HTML tags and the text or image it contains
- HTML tag: the element name surrounded by an opening and closing angle bracket
- Opening tag: the first HTML tag to start an HTML element (<)
- Content: the information contained between the opening and closing tags of an HTML element
- Closing tag: the second HTML tag used to end an HTML element— closing tags have a forward slash (/) inside of them. (/>)
Most HTML elements require a pair of tags, an opening tag and a closing tag, with text inserted in between. It is important to remember when using closing tags to put a forward slash (/). In this instance, the DOCTYPE declaration does not require a closing tag.
The Basic Structure of an HTML document consists of five elements
- <!DOCTYPE html>
- <html>
- <head>
- <title>
- <body>
Defining the basic structure of an HTML document
- <!DOCTYPE html> signals to the browser that the webpage is written in the latest version of HTML
- <html> tells the browser that it is reading an HTML file
- <head> specifies the settings of the HTML document that are not visible in the browser
- <title> displayed in the browser tab
- <body> includes all the content of the webpage
Now that you understand the basic structure of an HTML document, open a text editor (for the PC, it’s Notepad and for MAC it’s TextEdit) and start coding. For more information about HTML, visit this website.
Learn Digital Skills
Find out when the next cohort begins!
The most comprehensive program to up your game in the remote career world.
Learn More