What is HTML?

Hypertext markup language (HTML) is the coding language used to create web pages. With the help of CSS and JavaScript, HTML tells a web browser how to format, style, and link together text and images on a page. For example, the tag separates a block of text into paragraphs. HTML tags can also include attributes and values that tell the web browser what to do with the content.

Example

html
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Example Page</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
<nav>
<ul>
<li><a href=”#about”>About</a></li>
<li><a href=”#services”>Services</a></li>
<li><a href=”#contact”>Contact</a></li>
</ul>
</nav>
</header>

<main>
<section id=”about”>
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et magna eu leo tincidunt suscipit.</p>
</section>

<section id=”services”>
<h2>Our Services</h2>
<ul>
<li>Web Design</li>
<li>Graphic Design</li>
<li>SEO</li>
</ul>
</section>

<section id=”contact”>
<h2>Contact Us</h2>
<p>Email: info@example.com</p>
<p>Phone: 123-456-7890</p>
</section>
</main>

<footer>
<p>&copy; 2024 Example Company. All rights reserved.</p>
</footer>
</body>
</html>

In this example, we have a basic HTML document structure consisting of <html>, <head>, and <body> elements. The <head> section contains meta tags for the character set and viewport settings and a title for the webpage. The <body> section contains the main content of the webpage, including a header with navigation links, main sections with content about “About Us,” “Our Services,” and “Contact Us,” and a footer with copyright information. Each section is defined using appropriate HTML elements such as <header>, <nav>, <section>, <h1>, <h2>, <p>, <ul>, and <li>. Additionally, we use anchor tags <a> to create hyperlinks to different sections within the webpage.

Go back to the Marketing Glossary >>