caret

/ Glossary /

HTML

What is HTML?

HTML stands for HyperText Markup Language (HTML) and it describes the coding language used to create web pages. Alongside CSS and JavaScript, HTML tells a web browser how to format, style, and link together text, images, and other elements on a page.

How does HTML work?

HTML uses tags to determine the style, size, color, positioning, hierarchy, etc. of texts and images.

For example, if you’ve got the phrase This is a special offer!, and if you’d like the line to be separated from the rest of the text on your page, you need to indicate it is a paragraph by enclosing it between paragraph tags:

<p>This is a special offer!</p>

Similarly, if you’d like to emphasize how special the offer is, you can turn the word special into a element, as follows:

<p>This is a <strong>special</strong> offer!</p>

What are the most important HTML elements?

Let’s explore the most common elements found in web pages and HTML emails:

  • Paragraphs - blocks of texts can be added using <p> elements

<p>Discounts until midnight!</p>

  • Headings - HTML has 6 heading levels, from <h1> to <h6>, used to structure the content and help search engines rank the website according to their relevance

<h1>This Year’s Black Friday Report</h1> <h2>See who bought what</h2> <h3>Most bought categories</h3>

  • Images - the <img> element embeds an image onto the page in the position it appears, via the src attribute, which indicates the path to the image file. For visually impaired users or for those instances when the image cannot be displayed, the <a href='https://themarketer.com/resources/glossary/alt-text' target='_blank'>alt attribute</a> is used to describe the image and provide the reader with sufficient information regarding what the image conveys.

<img src="images/apple-logo.png" alt="An apple bitten on the right-hand side" />

  • Links - links are crucial for any web page, and adding a link is possible with the use of the <a> attribute, featuring the href attribute filled with the address toward which the link will send.

<a href="https://www.themarketer.com/pricing/">Discover the best plan for you</a>

  • Lists - HTML allows for the creation of both unordered lists, such as shopping lists, where the order of the items does not matter, and ordered lists, for example, a recipe, where the order of the items does matter. Ordered lists are wrapped in a <ol> element, while unordered lists are wrapped in an <ul> element. For either of them, each list item is wrapped in an <li> element.

<p>This year, the top-grossing categories were:</p>

<ol> <li>Fashion & accessories</li> <li>Computers & IT</li> <li>Home & deco</li> </ol>

Table of contents

1. How does HTML work?
2. What are the most important HTML elements?

Send better and affordable emails today

Grow your business with a powerful loyalty program and email marketing features

Get started for free

Already have an account? Sign in

mkt cookies image

We use cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. Learn more