You may have heard the term HTML before, but what does HTML actually mean? HTML is an acronym that stands for HyperText Markup Language. Markup languages are different from programming languages. Whereas programming languages help us modify data, we use markup languages to determine how elements are displayed on a webpage.
HTML has a simple, text-based structure that's easy for beginners to learn and understand. Here's an example:
<html> <head> <title>Page Title</title> </head> <body> <h1>Heading</h1> <p>Content</p> </body> </html>
So, what is HTML used for? Web developers use it to organize, format, and display a web page's content. Read on to learn more about how HTML works, how HTML5 improved its functionality, and the different careers that use it.
How does HTML work?
HTML is usually stored in files that use the .htm or .html extension. A website can include hundreds or even thousands of these HTML files kept in various directories.
When you visit a web page, its server sends its HTML files to your browser. Your browser then reads the HTML in the files and displays it. Some web applications don't use static HTML but generate it in response to specific actions on their servers.
What are HTML tags and elements?
Think of HTML elements as the building blocks of a web page. Elements are defined by their opening and closing tags and can be nested within other elements. Web developers use elements to structure a web page into sections, headings, and other content blocks. Here's an example:
<div> <h1>Heading</h1> <p>The main content</p> <ul> <li>List item one</li> <li>List item two</li> </ul> </div>
In the HTML example above, the first element we see is
<div>, which wraps around the other elements. Div is one of the most common HTML elements and is a simple way to separate a page into sections. For example, if you wanted to create two columns on a web page, you could use div elements to define them.
Nested inside the div, we see an
<h1> element. H1 elements define the main heading of a web page. The text within a heading will usually be larger and bolder, depending on the styles applied to the page.
<p> tag creates a paragraph element. There will usually be a margin after the element, again, depending on the styles.
Finally, we see a few sets of nested elements. The
<ul> tag creates an unordered list, which does nothing until you nest at least one set of list elements (
<li>) within it. A browser would render these elements as something like this:
- List item one
- List item two
The HTML elements listed above are some of the most common, but we can use others to add images, tables, and other elements to web pages.
What is HTML5?
HTML5 is the latest version of HTML. The update improved the language's functionality, enabling the use of features that previously required additional software like browser plugins. It also added the ability to create applications using HTML that function offline. Here are some of the tags that HTML5 added to the language:
<video>: The video tag allows developers to embed and stream video from a browser without needing a plugin like Flash or Silverlight
<audio>: The audio tag is similar to the video tag in that you can use it to embed and stream sound files from a web browser.
<nav>: HTML5 also added new tags to define specific web page sections, like the nav tag, which defines navigation elements.
The features listed above are only some of the many brought about by HTML5. It was one of the biggest changes in the language's definition and made way for today's modern dynamic web pages.
What careers use HTML?
Back-end engineers also need to be proficient with HTML. Even though the other languages in their tech stacks may generate HTML for them, they still need to understand HTML structure to keep everything running smoothly.
We also use HTML outside of the Internet, like in intranets and internal applications. So, even if you're coding for offline purposes, you should still learn HTML. It can even be beneficial for non-technical teams, as some marketers use it for blogs and emails.
Learn more about HTML
You can find out more about HTML and its many uses in our Learn HTML course. In this course, you'll learn everything you need to know about HTML's basic syntax while creating your first web page.