A page of HTML code on a computer screen

What is HTML? A Beginner’s Guide

Emily Stevens

HTML is a basic programming language used for creating websites. If you’re considering a career in web design or development, HTML knowledge is a mustbut even in other professions, like marketing, a bit of HTML can come in handy.

Once you’ve got the hang of it, writing and working with HTML is a breeze. If you’ve never touched it, however, it can seem like one of the internet’s biggest mysteries.

HTML was created by physicist Tim Berners-Lee in the late 1990s, and has been continuously revised and updated over the years. In this post, we’ll provide the ultimate introduction to basic HTML.

This guide is aimed at anyone and everyone; no tech knowledge required!

Ready to get started with HTML? Let’s go.

What does HTML mean?

HTML stands for Hypertext Markup Language - and, as previously mentioned, it’s a computer language used for the creation of websites. HTML describes how a document should be displayed by an internet browser.

Hypertext is basically text that contains links to other texts. You can click on these links to jump to other pages or sections of text.

The Markup part refers to HTML tags and the text inside them. We’ll talk more about tags later, but here’s a quick example:

<b>This text should be bold.</b>

In this case, <b> and </b> are the HTML tags. They are marking the enclosed text as “bold” - hence, the “markup” element of HTML.

Finally, HTML is a language - pretty self-explanatory!

How does HTML work?

HTML works by telling the internet browser how to display the page.

First, the author uses a basic text editor on the computer (such as TextEdit for Mac) to create their HTML document. The author then fills their HTML document with a series of HTML elements, using HTML tags. As we saw before in the markup example, tags determine how the enclosed text should be displayedwe’ll explain how to write tags in the next section.

Once the document is complete, the author saves it as a html file and opens it in their internet browser. The browser then reads the file and follows the instructions to render the page in a certain way - as provided by the HTML tags.

So, when you use the “bold” tags, you’re essentially telling the browser to display this sentence in bold: <b>Please make this sentence bold!</b>

When the browser reads this, it knows to display the sentence as described: Please make this sentence bold!

Of course, the HTML tags are not displayed in the browser.

Writing HTML: The Basics


We know that HTML tags tell the browser how the enclosed text should be displayed - but how do you write these tags?

Tags are written inside angle brackets, and tend to come in pairsso, they consist of both an opening and a closing tag. For example, the <p> tag is used to indicate a new paragraph. The opening tag is written as follows: <p>. After this tag, you write your paragraph. To finish, add your closing tag, which is the same as the opening tag but with a forward slash. In this case, it would be: </p>.

A pair of tags with text enclosed is known as an element. Here are some examples of common HTML elements and their corresponding tags:

<h1>This is a heading</h1>

<p>This is a paragraph.</p>

<b>This is a bold sentence.</b>

<i>This is an italic sentence.</i>

Most HTML tags follow this open-and-closing pattern, but there are also some tags which only need an opening tag to be valid. These are known as singleton tags, and include things like <br> to indicate a line break, and <img> for including an image. The browser will understand and act on these tags without the need for a closing tag.


You can also assign attributes to your HTML elements. Attributes provide extra information about the text contained within the tags. For example, if you wanted to hyperlink the phrase “my website” in your HTML document, you would first use the tag pairs <a> and </a> to specify that the text should be linked. To tell the browser where the text should be linked toi.e. the link addressyou use the href attribute. Attributes, like the text, are always enclosed within the tags:

HTML: <a href=”https://www.google.com”>My website</a>

Displayed as: My website

This is just a very simple introductionyou’ll learn more about attributes as you delve deeper into HTML, but for now we’ll stick to the very basics.

Writing a HTML document

When writing your HTML document, you need to tell the browser that it’s dealing with a HTML fileotherwise, it won’t be able to display the page. Each HTML doc must therefore contain the <html> and <body> tags. Don’t forget to close these tags at the very end of the document!

Here’s an example of what your HTML document might look like in the text editor:

<title>This is the title of my html document</title>

<h1>This is a large heading</h1>
<p>This is the first paragraph.</p>
<b><p>This is the second paragraph, which will be displayed in bold.</p></b>


To make sure that you’ve written your HTML correctly, you can use the W3schools Tryit Editor tool. Simply enter your HTML and click “run” and you can see how your HTML would be displayed in the browser.

Learning HTML: What next?

There’s loads more you can do with HTMLfrom embedding images to defining the styles and colors of different page elements. When it comes to creating professional, fully functional websites, HTML goes hand in hand with CSS and JavaScript. CSS stands for Cascading Style Sheets, and is used to style the HTML elements of your webpage. JavaScript is another programming language which enables you to introduce interactive elements to your basic webpage. Together, HTML, CSS and JavaScript form the foundation for standard web technologies.

Before moving on to the more complex topics of CSS and JavaScript, make sure you’re completely comfortable with HTML. W3schools provides a comprehensive guide to each and every aspect of HTML, and you can also complete practice exercises and take their HTML quiz to check your progress.

Ready for more? Check out our Beginner’s Guide to the 10 Most Popular Programming Languages.

What You Should Do Now

  1. Get a hands-on introduction to web development with a free, 5-day short course.
  2. Become a qualified web developer in 4-7 months—complete with a job guarantee.
  3. Talk to a Career Advisor to discuss career change and find out if web development is right for you.
  4. Learn about our graduates, see their portfolio projects, and find out where they’re at now.

If you enjoyed this article then so will your friends, why not share it...

Emily Stevens

Emily Stevens

Managing Editor at CareerFoundry

Originally from England, Emily moved to Berlin after studying French and German at university. She has spent the last five years working in tech startups, immersed in the world of UX and design thinking. In addition to writing for the CareerFoundry blog, Emily has been a regular contributor to several industry-leading design publications, including the InVision blog, UX Planet, and Adobe XD Ideas.