Getting Started with HTML
What Is HTML? Hypertext Markup Language Basics Explained.
HTML
HTML stands for HyperText Markup Language. It is a standard markup language for web page creation. It allows the creation and structure of sections, paragraphs, and links using HTML elements (the building blocks of a web page) such as tags and attributes.
HTML has a lot of use cases, namely:
- Web development.
- Internet navigation.
- Web documentation.
It’s also worth noting that HTML is not considered a programming language as it can’t create dynamic functionality. It is now considered an official web standard. The World Wide Web Consortium (W3C) maintains and develops HTML specifications, along with providing regular updates.
What is HTML's part in WEB.
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.
<p>This is how you add a paragraph in HTML.</p>
Another critical part of an HTML element is its attribute, which has two sections – a name and attribute value. The name identifies the additional information that a user wants to add, while the attribute value gives further specifications.
For example, a style element adding the color purple and the font-family verdana will look like this:
<p style="color:purple;font-family:verdana">This is how you add a paragraph in HTML.</p>
- 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 emphasize 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.
Commonly Used HTML Tags and HTML Elements.
This section will discuss the most-used HTML tags and two main elements – block-level elements and inline elements.
Block-Level Elements
A block-level element takes up the entire width of a page. It always starts a new line in the document. For example, a heading element will be in a separate line from a paragraph element.
Every HTML page uses these three tags:
<html>
tag is the root element that defines the whole HTML document.<head>
tag holds meta information such as the page’s title and charset.<body>
tag encloses all the content that appears on the page.
<head>
<!-- META INFORMATION -->
</head>
<body>
<!-- PAGE CONTENT -->
</body>
</html>
Other popular block-level tags include:
Heading tags – these range from
<h1> to <h6>
, where heading h1 is largest in size, getting smaller as they move up to h6.Paragraph tags– are all enclosed by using the
<p>
tag.
- List tags– have different variations. Use the
<ol>
tag for an ordered list, and use<ul>
for an unordered list. Then, enclose individual list items using the<li>
tag.
Inline Elements
An inline element formats the inner content of block-level elements, such as adding links and emphasized strings. Inline elements are most commonly used to format text without breaking the flow of the content.
For example, a <strong>
tag would render an element in bold, whereas the <em>
tag would show it in italics. Hyperlinks are also inline elements that use an <a>
tag and an href attribute to indicate the link’s destination:
<a href="https://example.com/">Click me!</a>
Conclusion
HTML is the primary markup language found on the internet. Every HTML page has a series of elements that create the content structure of a web page or application.
HTML is a beginner-friendly language with plenty of support and is mainly used for static website pages. HTML works best together with CSS for the styling and JavaScript for the functionality.
Let me know in the comment section if you have any other favorite resources to learn HTML with. Good luck.
> If you enjoyed this article, share it with your friends and colleagues!