HTML (Hyper Text Markup Language) is the essential structure of every webpage. It utilizes various tags to structure content, improve readability, and enhance SEO performance. This article will explore the most fundamental HTML5 tags, including semantic tags, non-semantic tags, block elements, inline elements, attributes, and the HTML boilerplate.
Topics covered in this article are:
What are HTML Tags?
HTML tags are unique keywords enclosed within angle brackets (<>). They define elements on a webpage. The majority of HTML tags appear in pairs, consisting of an opening tag (<>) and a closing tag (</>), which help define and structure content effectively.
Example:
This article discusses HTML
HTML Boilerplate
An HTML boilerplate refers to the basic structure of an HTML document. It includes essential tags that every web page needs.
Basic HTML Boilerplate Structure:
We are discussing HTML boilerplate
Welcome to upskillinghub HTML basics article
Below you will get clear idea on html boilerplate
- <!DOCTYPE html> – Declares the document as HTML5.
- <html> – The roote lement of the html page.
- <head> – Head Includes metadata and the document title..
- <meta> –Defines character encoding and viewport settings.
- <title> – Sets the page title visible in the browser tab.
- <body> – Encloses all the visible content.
Semantic HTML Tags
Semantic HTML elements clearly define the purpose of webpage content, enhancing both SEO and accessibility. These tags help search engines understand the structure of a page, improving rankings.
Common Semantic HTML Tags:
- <header> – Represents introductory or navigation-related content.
- <nav> – Defines a section specifically for navigation links.
- <section> – Organizes related content into distinct sections, improving readability, and structure.
- <article> – Defines independent, self-contained content, such as blog entries, news articles, or user-generated posts, making it more readable and SEO-friendly.
- <aside> – Contains supplementary information like sidebars or widgets.
- <footer> – Defines the footer section, including copyright, links, or additional details.
Example:
HTML Basics
HTML structures webpages using various elements.
Non-Semantic HTML Tags
Non-semantic elements do not convey specific meaning about their content but are used for layout and styling purposes. They are essential for web design but do not contribute to SEO directly.
Common Non-Semantic Tags:
- <div> – A block-level container for grouping multiple elements.
- <span> – An inline container used for applying styles to parts of text.
- <b> – Makes text bold without indicating emphasis or importance.
- <i> – Italicizes text purely for styling, without adding semantic value.
Using semantic HTML improves search engine rankings, enhances user experience, and makes webpages more accessible to screen readers.
Example:
This is a paragraph inside a div.
This is will appear in Italic.
Block-Level Elements
Block elements occupy the full width available and begin on a new line.
Examples of Block Elements:
- <div> – A generic container.
- <p> – Defines a paragraph.
- <h1> to <h6> – Headings with different importance levels.
- <ul> and <ol> – Unordered and ordered lists.
- <li> – List items within lists.
Example:
Website Title
This is a paragraph.
Inline Elements
Inline elements do not start on a new line and occupy only the required width.
Examples of Inline Elements:
- <span> – A container for inline content.
- <a> – Creates hyperlinks.
- <strong> – Displays text in bold with emphasis.
- <em> – Italicizes text to show importance.
- <img> – Displays images.
Example:
This is bold and italic text.
HTML Attributes
Attributes enhance HTML elements by providing additional information.
Commonly Used Attributes:
- href – Defines the destination URL for hyperlinks, guiding users to internal or external pages.
- src – Defines the source path of an <img>.
- alt – Provides alternative text for images.
- id – Assigns a unique identifier to an element, enabling precise styling and scripting.
- class – Groups multiple elements under a shared style.
- style – Adds inline styling to elements.
Example:
Understanding Div tag, Id and Class attributes
The <div> tag, along with id and class attributes, help structure, style, and organize web page elements effectively.
<div> (Division)
A <div> is a block-level container used to structure multiple elements.
Example:
Section Title
Content inside a div.
Id Attribute
The id attribute uniquely identifies an element, allowing targeted styling and JavaScript interactions.
This paragraph has a unique ID.
class Attribute
The class attribute groups multiple elements under a shared style, allowing for consistent formatting.
Example:
This text follows a common style.
Another paragraph with the same class.
HTML Comments
HTML comments help developers by adding notes within the code. These comments do not affect the webpage display.
Syntax:
Example:
This is a paragraph.
Practice HTML5 Practically
The best way to understand HTML5 is by practicing it hands-on. Below is a simple project that demonstrates the use of basic HTML5 tags, including headings, paragraphs, links, images, and lists. Try coding it yourself by replicating the output—it will help you grasp how different elements work together to structure a webpage. Practicing with real examples will strengthen your understanding and improve your coding skills.

Practicing Basic HTML Tags
Implementing Few Tags in Paragraph
html stands for hypertext markup language. It is used to create structure of web pages
Here i used a (Break and Strong) tags to separate/devide/break content and strong tag used to give importance and highlight (Break and Strong)
html contains head tag and body
in head tag contains meta and tittle
in body tage contains all visible content
Here I used PRE TAG to display same written format
attributes: are additional information about tags
Here I used (BOLD TAG) highlight the content
html contains block elements and in line elements
Table of Contents
- I'm a Web Developer Practing html is a basic thing for me................1
- Being a web developer, I find practicing HTML essential..................2
- For a web developer like me, working with HTML is a basic necessity......3
- Practicing HTML is just a standard part of my web development routine....4
- HTML practice is a basic yet crucial part of my web development journey..5
Conclusion
Understanding basic HTML tags is crucial for creating well-structured, SEO-friendly webpages. Differentiating between semantic and non-semantic tags, recognizing block and inline elements, and utilizing attributes correctly contribute to clean, efficient, and accessible code. Additionally, the HTML boilerplate provides a solid foundation for every webpage.
HTML5 includes hundreds of tags, each serving a unique purpose. To master web development, explore and experiment beyond your limits by practicing consistently. Refer to trusted resources like MDN Web Docs and W3Schools to deepen your knowledge and stay updated with best practices.
In the next article, we will dive into HTML Tables and Forms in detail. Stay tuned! 🤗🤝🏻