Without HTML the web as we know it wouldn’t exist. HTML creates structure on the web from page layouts and paragraphs to links, tags and attributes. Every time we go online, whether we know it or not, HTML is most likely present. Here we will explain some of the fundamental concepts of HTML.
What is HTML?
HTML is a standardised system for tagging text files that creates the structure for just about every page that we find and use on the web. It’s HTML that adds in page breaks, paragraphs, bold lettering, italics, and more. HTML works to build this structure by using tags that tell browsers what to do with text.
For example, to make a word appear bold, we put that word between the following tags <strong>bold</strong>. The first tag indicates the start of the word(s) that we want to bold, and the closing tag(/) indicates where we want the bold to stop. It’s the basis for pretty much every page on the web. If you are learning to code, this is the place to start.
What does HTML stand for?
HTML stands for Hypertext Markup Language. A hypertext is a sort of meta text that is used to reference other pieces of text. The Markup Language element of HTML means that it provides a series of markings that instruct a web browser on what it should do with those pieces of text.
What is HTML used for?
HTML is the skeleton of just about any website. It provides the bones that underpin everything else on site. Common things that HTML is used to define are:
- Paragraphs
The HTML paragraph element is one of the most common elements and as you might have guessed it defines a paragraph. - Line Breaks
As with print media, a paragraph creates a line break below it to visually separate it from other paragraphs. This is used to emphasise a semantic separation of content. The same structure is used in a novel or a magazine. - Block Elements
Elements that create the spacing below themselves on a page are called block elements. Block elements appear vertically down the left-hand side of a page at least until they are styled by CSS. Examples of block elements are <div>, <article>, <table>, and many more. This feature allows HTML to start separating a webpage into different sections - Headings
Paragraphs and headings work in concert to create the majority of the text content of a web page and its structure. HTML has six heading elements, which are numbered 1 through 6. h1 is the most significant and usually contains the title of the content – Not to be confused with the title that appears in the browser tab. h2 represents a subsection. h3 and so on represent identifiers of further subjects in subsections until we get to h6.
To give a clearer understanding of how HTML works to create the final version of a webpage, if HTML is our skeleton, CSS (Cascading Style Sheets) would be what gives us our features, like the colour of our eyes, skin and hair. JavaScript would be to do with our movements and how we interact with people – like when we reciprocate a handshake, wink, laugh or ask a question.
How HTML works – HTML tags
HTML works by using a series of tags to inform a browser what it should be doing with text on page and where it should be loading further resources from. There are over 100 HTML tags currently available to use, although most sites will only need a handful of these to work as they should.
There are three HTML tags that are necessary for each page. These are <html>, <head>, and <body>. To indicate to a webpage that you are using HTML, each page will open with <html> and close with </html>. The <head> tag contains metadata not visible on-page but important for functionality, and the <body> tag denotes where the body content of a page resides. Each of these necessary elements can only be used once per page. The basic structure of common HTML tags is detailed below:
<!DOCTYPE html>
<html>
<head>
<title>Title that appears on browser tab</title>
</head>
<body>
<p>Here is a sentence with <strong>some words</strong> using <strong>bold.</strong></p>
</body>
</html>
Below is what that would look like on the front end.
Here is a sentence with some words using bold.
Common HTML Elements
Other non-essential HTML elements can be used multiple times on a webpage to define its structure and emphasise certain sections of text. Common HTML elements are listed below:
- <em> to add italics/emphasis
- <head> meta text not visible on the webpage
- <header> defines the header of a page or section in a web page
- <body> body of page
- <br> to insert a line break
- <audio> embedding sound content
- <video> embedding video content
- <button> for using clickable buttons
- <div> to define/divide a section
- <img> for inserting images
- <li> to represent a list
- <ol> to define an ordered list
- <ul> to define an unordered list
- <u> to underline text
Another common feature of HTML is embedding CSS, Javascript or PHP files within it. These files build dynamic web pages that add flare and interactivity to the base HTML skeleton. There are many other HTML features that you can explore in our free 5 Day Coding Challenge.
HTML5
HTML5 is the most recent version of HTML. With each version comes new abilities, etc. However, it is ever-advancing and evolving. HTML5 offers more functionality than previous iterations of the language. For example;
- It can support audio and video using the relevant tags, <audio> & <video>.
- It is supported by all browsers including Chrome, Safari, Mozilla, and more.
- It is easier to use than older versions.
- It works better on mobile devices.
How do I view a page’s HTML?
It’s easy to view a page’s HTML, even if it’s not your page. For sample purposes, I’ll use Google Chrome’s procedure here. It’s as simple with other browsers too. To view a page’s HTML, right-click on the page and click on “view page source”. You can also use the keyboard shortcut CTRL + U on Windows, or Option + Command + U on iOS.
Why is it Useful to Know HTML?
HTML is really a developer’s bread and butter. If you have any interaction with code, website or app builds in your job or day-to-day life you need to know this language. To see how vital HTML and technology is, take your smartphone out of your pocket. How many apps do you have? How often do you use the browsers? Do you use it for shopping or to make purchases? Does it control things, like the temperature of your home? Do you use it to book hotels, flights, haircuts, or anything else? Do you use it to order food or to listen to or watch something online? All of this relies on HTML.
Right now, there are hundreds of thousands of job roles throughout Europe that require HTML skills. In fact, the world is going through a severe skills gap, and as a result, salaries are always growing for software developers. Employers recognise these gaps, and according to numerous sources, they are losing vast amounts of potential revenues as a result. So, whether you are already working in tech or are looking for a career change, learning HTML can be extremely useful to you.
Where can I learn HTML?
There are numerous ways to learn HTML. Code Institute teaches it as part of its Full Stack Software Development diploma. We also teach the basics of HTML for free through our 5 Day Coding Challenge. After just one hour a day over five days, you will have built your first ever web page.
Take your first step in learning some of these skills. Register for our 5 Day Coding Challenge through the form below.