Most commonly used tags in HTML - GeeksforGeeks (2024)

Skip to content

Most commonly used tags in HTML - GeeksforGeeks (1)

Last Updated : 01 Jul, 2024

Summarize

Comments

Improve

Suggest changes

Like Article

Like

Save

Report

Most commonly used tags in HTML refer to HTML elements frequently utilized for structuring web content. These include <div> for division, <p> for paragraphs, <a> for hyperlinks, <img> for images, and others essential for building web pages, forming the basis of web development.

HTML contains lots of predefined tags. Some of them are described below.

Table of Content

  • Document structure tag
  • Commonly used tags in HTML
  • Examples of Commonly used tags in HTML
  • Conclusion
  • Supported Browsers

Document structure tag

The <html> tag is essential, encapsulating the entire HTML document and serving as the root element for content organization.

Structure TagSyntaxDescription
<html><html> Statements... </html>The root of the HTML document specifies it as HTML.
<head><head> Statements... </head>Contains head elements such as title, style, and meta tags in the HTML file.
<title><title> Statements... </title>Defines the title of an HTML document.
<body><body> Statements... </body>Defines the body of an HTML document, containing content like images, tables, and lists.
HTML TagSyntaxDescription
<div><div>...</div>Defines a division or section in an HTML document.
<p><p>...</p>Defines a paragraph.
<a><a href="...">...</a>Defines a hyperlink.
<img><img src="..." alt="...">Embeds an image.
<ul><ul><li>...</li></ul>Defines an unordered list.
<ol><ol><li>...</li></ol>Defines an ordered list.
<li><li>...</li>Defines a list item.
<table><table>...</table>Defines a table.
<tr><tr>...</tr>Defines a table row.
<th><th>...</th>Defines a table header cell.
<td><td>...</td>Defines a table data cell.
<form><form>...</form>Defines an HTML form for user input.
<input><input type="...">Defines an input control within a form.
<button><button>...</button>Defines a clickable button.
<h1><h6><h1>...</h1>Define headings of different levels.
<span><span>...</span>Defines a generic inline container.
<label><label for="...">...</label>Defines a label for an input element.
<iframe><iframe src="..."></iframe>Embeds an inline frame for external content.

Examples of Commonly used tags in HTML

Example 1: This example shows the implementation Document structure tag.

HTML
<!DOCTYPE html><html><head> <title>Title of your web page</title></head><body> HTML web page contents</body></html>

Output:

Most commonly used tags in HTML - GeeksforGeeks (3)

Example 2: In this example we starts with <!DOCTYPE html>, setting HTML5 type. <html lang=”en”> defines English language. <head> contains metadata. <title> sets browser tab title. <body> contains visible content including common HTML tags like <div>, <h1>, <p>, <a>, and <img>.

HTML
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width,  initial-scale=1.0" /> <title>Most commonly used tags in HTML</title></head><body> <div> <h1>Welcome to Our Website!</h1> <p> We are glad to have you here. Explore our content and feel free to reach out if you have any questions. </p> <a href="https://www.geeksforgeeks.org/"> <img src="https://media.geeksforgeeks.org/wp-content/uploads/20240308152622/GeeksLogo.png" alt="About Us" /> </a> <p> Learn more <a href="https://www.geeksforgeeks.org/about/?ref=footer"> about us </a>. </p> </div></body></html>

Output:

Most commonly used tags in HTML - GeeksforGeeks (4)

Commonly used tags in HTML example output

Conclusion

Understanding and using common HTML tags is essential for effective web content structuring. Tags like <div>, <p>, <a>, and <img> help create organized, interactive web pages. Mastering these tags enhances functionality and user experience, ensuring accessibility across major browsers.

Supported Browsers



Please Login to comment...

Similar Reads

Which tags contain both opening & closing tags in HTML ?

HTML tags are markers that define the structure and content of web documents. They consist of angle brackets enclosing a tag name, such as &lt;p&gt; for paragraphs or &lt;img&gt; for images, and can include attributes for additional information. So to better understand which tags are opening and closing in nature, we can divide them into 4 parts. D

5 min read

RegEx to Match Open HTML Tags Except Self-contained XHTML Tags

We will learn to Create a regular expression pattern that matches open tags in HTML except for self-contained XHTML tags. A regular expression (RegEx) can be used to match open tags, excluding XHTML self-contained tags(For Eg- &lt;br/&gt;, &lt;img /&gt;). This can be achieved by creating a pattern that matches opening angle brackets followed by a t

2 min read

Commonly used tools for testing in React

Testing is a critical aspect of building reliable and maintainable React applications. Several tools and libraries are commonly used for testing in the React ecosystem, covering unit testing, integration testing, and end-to-end testing. Some popular tools for testing in React:Jest: Jest is a widely used JavaScript testing framework that comes pre-c

2 min read

What Classes are commonly used for Card Components in Tailwind CSS ?

In Tailwind CSS, Commonly used classes for card components include "bg-white" for the card background, "p-4" for padding, "rounded-md" for rounded corners, and "shadow-md" for a subtle shadow effect. These classes provide a quick and responsive way to style card elements in a Tailwind CSS project. Trivial Card Component Classesbg-[color] Sets the b

2 min read

Which tags are used to displaying data in tabular form in HTML ?

In this article, we will discuss the tags used to display the data in tabular form. Tags: Tags are the starting and ending parts of an HTML element. Every tag starts with the "&lt;" symbol and ends with the"&gt;" symbol. Whatever inside these symbols are called tags. Opening and closing tags are used to store any information inside the tag. Opening

3 min read

What are the HTML tags used to display the data in the tabular form ?

In this article, we will know the HTML tags that can be used to display the data in tabular form. A table is a representation of data in rows and columns, that helps to organize the complex structured data. Tables are widely used in communication, research, and data analysis. For instance, if we need to find the data from the set of information tha

4 min read

How to display HTML tags as plain text in HTML ?

In this article, we will learn how to display HTML tags as plain text in HTML. We can replace the plain text by using &lt; with &amp;lt; or &amp;60; and &gt; with &amp;gt; or &amp;62; on each HTML tag. HTML Entities:Sign DescriptionEntity nameEntity number&lt;Less than(start of HTML element)&amp;lt;&lt;&gt;Greater than(end of HTML element)

2 min read

Commonly asked JavaScript Interview Questions | Set 1

What is JavaScript(JS)? JavaScript is a lightweight, interpreted programming language with object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.What are the features of JavaScript?JavaScript is a lightweight, interpreted programming language. JavaScript is designed for creating network-centric applica

4 min read

What is the most used method for hashing passwords in PHP ?

Hashing password is a technique of converting a single password into another string called hashed password. The hashed password is generally one-way, i.e. we can't go to the original password from the hashed password. So the thing is why we needed to use hashing to do all this stuff, why going one more mile if we can save our passwords into the dat

3 min read

8 Most used NPM packages for React

React, a popular JavaScript library for building UI (user interfaces), offers a vast ecosystem of packages to enhance development efficiency and functionality. React allows developers to utilize individual parts of their application on both the client side and the server side, which ultimately boosts the speed of the development process. Table of C

7 min read

Essential HTML Tags

HTML stands for HyperText Markup Language. It is an important language to design web pages or websites. These websites are visible to anyone on the internet. HTML is a combination of Hypertext and Markup language. Where hypertext is a link between the webpages, and markup language is used to define the text document within a tag, that defines the s

5 min read

HTML Deprecated Tags

The deprecated tags or attributes are those attributes which are replaced by some other attributes. The tag or attributes deprecated when the same attributes is achieved by some other way. They are considered outdated and may not be supported in modern browsers or future versions of HTML. HTML Deprecated Tag: Complete list of deprecated tags are gi

2 min read

How to remove HTML tags with RegExp in JavaScript ?

Here, the task is to remove the HTML tags from the string. Here string contains a part of the document and we need to extract only the text part from it. Here we are going to do that with the help of JavaScript. Approach: Take the string in a variable.Anything between the less than symbol and the greater than symbol is removed from the string by th

2 min read

Use of blockquote, q and cite tags in HTML

HTML | blockquote Tag: The &lt;blockquote&gt; tag in HTML is used to display the long quotations (a section that is quoted from another source). It changes the alignment to make it unique from others. It contains both opening and closing tags. Syntax: &lt;blockquote&gt; &lt;p&gt;The quote is input here.&lt;/p&gt; &lt;/blockquote&gt; Example: In thi

2 min read

How to add a parent to several tags in HTML ?

The &lt;li&gt; tag is used to represent the list of items using HTML. It must be contained in a parent element.Types of list: Ordered listUnordered listDefinition list Ordered list: The &lt;ol&gt; tag is used to create an ordered list. Each list items start with the tag&lt;li&gt;. The attributes are used in ordered list are: Type: It can have five

2 min read

Physical and Logical Tags in HTML

Physical and Logical tags are used in HTML for better visibility and understanding of the text by the user on the web page. However, both tags differ from each other as suggested by their names. Logical Tags :Logical Tags are used in HTML to display the text according to the logical styles. Following are the Logical tags commonly used in HTML. Logi

2 min read

What are logical tags in HTML ?

Logical tags are used to tell the browser what kind of text is written inside the tags. They are different from physical tags because physical tags are used to decide the appearance of the text and do not provide any information about the text. Logical tags are used to indicate to the visually impaired person that there is something more important

5 min read

What are physical tags in HTML?

Physical Tags are used to indicate that how specific characters are to be formatted or indicated using HTML tags. Any physical style tag may contain any item allowed in text, including conventional text, images, line breaks, etc. Although each physical tag has a defined style, you can override that style by defining your own look for each tag. All

5 min read

What are the HTML tags that deprecated in HTML5 ?

In this article, we will see the various deprecated Html tags &amp; their alternative tags in HTML5. Deprecated tags are those tags that are allowed, but not recommended for use and are being replaced by newer ones. The tag or attributes depreciated when the same attributes are achieved in some other way. Several reasons for being discarded &amp; u

3 min read

Explain use of Meta tags in HTML

Meta Tag(&lt;meta&gt;) is a HTML component that gives the metadata about a HTML document. MetaData can be characterized as data that gives the data of different information or basic information about information. It is an empty tag, for example, it just has an initial tag and no end tag. They are always present inside the &lt;Head&gt; tag and are u

4 min read

What are the various formatting tags available in HTML ?

As we know, HTML provides many predefined elements that are used to change the formatting of text. The formatting can be used to set the text styles (like – bold, italic, or emphasized, etc.), highlight the text, make text superscript and subscript, etc. In this article, we will discuss different formatting tags in HTML. &lt;b&gt; and &lt;strong

3 min read

What are various tags available to add special meaning to the text in HTML ?

In this article, we will discuss the tags that will add special meaning to the text in HTML. HTML &lt;b&gt; and &lt;strong&gt; Tags: Both tags are used to make the text bold. The text content of the tag is shown as important information on the webpage. Syntax: &lt;b&gt; ... &lt;/b&gt; &lt;strong&gt; ... &lt;/strong&gt; Example: Using the code below

2 min read

What are HTML tags & Attributes mandatory for a good Web page in SEO ?

Search engine optimization (SEO) is the process that involves enhancing the visibility of a website on search engines. This is achieved by increasing the website's ranking on search engine results pages, such as Google. The higher the website appears on these pages, the more likely it is to receive a larger volume of traffic. SEO involves understan

5 min read

Why do we need to declare the &lt;ul&gt; & &lt;ol&gt; tags in HTML ?

The &lt;ul&gt; tag is used to create an unordered list. It is used to make a list in those situations where the ordering of list items is not significant. On the other hand, the &lt;ol&gt; tag is to create an ordered list. As the name implies, it is used in those situations where list items are maintained order-wise. Every list has one or more list

4 min read

Differentiate between &lt;th&gt; &amp; &lt;thead&gt; tags in HTML Table

In this article, we'll be differentiating the &lt;th&gt; tag and &lt;thead&gt; tag used in HTML. Before going forward, we must know that both the tags are used to give the headers in the HTML tables. &lt;th&gt; tag is used to give header in the cell of a table in HTML whereas &lt;thead&gt; tag is used to give the header of a group of a table. Note:

4 min read

Is HTML elements are same as tags or not ?

HTML elements and tags are a lot different. Let's see what HTML elements and Tags actually are and their differences. The below image tells about HTML Elements and HTML Tags. HTML Tags: The starting and ending point parts of an HTML document are HTML Tags, which start with &lt; (less than) and end with &gt;(greater than) angle bracket, and whatever

2 min read

How to remove HTML tags from data in PHP ?

In this article, we will see how to remove HTML tags from data in PHP. PHP provides an inbuilt function to remove the HTML tags from the data. The strip_tags() function is an inbuilt function in PHP that removes the strings form HTML, XML and PHP tags. It accepts two parameters. This function returns a string with all NULL bytes, HTML, and PHP tags

2 min read

How to Change Text Inside all HTML Tags using JavaScript ?

In this article, we will learn how to change the text content inside all HTML tags using JavaScript. This skill is valuable when you need to dynamically modify the text displayed on a web page. which can be useful for various scenarios like updating content, internationalization, or creating dynamic user interfaces. Changing the text inside HTML ta

3 min read

Container and Empty Tags in HTML

HTML uses predefined tags that tell the browser how to display the content. Tags are nothing but some instructions that are enclosed in angle braces(i.e., &lt;&gt;). Tags are used in many places of the webpage but many users are often confused about some tags whether it is a container or an empty tag. They get this confusion because they don't know

6 min read

What are HTML Tags ?

HTML (HyperText Markup Language) is the standard markup language used to create the structure and layout of web pages. HTML documents consist of a series of elements, and these elements are defined using HTML tags. HTML tags are essential building blocks that define the structure and content of a webpage. In this article, we'll explore what HTML ta

2 min read

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy

Most commonly used tags in HTML - GeeksforGeeks (6)

'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, check: true }), success:function(result) { jQuery.ajax({ url: writeApiUrl + 'suggestions/auth/' + `${post_id}/`, type: "GET", dataType: 'json', xhrFields: { withCredentials: true }, success: function (result) { $('.spinner-loading-overlay:eq(0)').remove(); var commentArray = result; if(commentArray === null || commentArray.length === 0) { // when no reason is availaible then user will redirected directly make the improvment. // call to api create-improvement-post $('body').append('

'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); return; } var improvement_reason_html = ""; for(var comment of commentArray) { // loop creating improvement reason list markup var comment_id = comment['id']; var comment_text = comment['suggestion']; improvement_reason_html += `

${comment_text}

`; } $('.improvement-reasons_wrapper').html(improvement_reason_html); $('.improvement-bottom-btn').html("Create Improvement"); $('.improve-modal--improvement').hide(); $('.improvement-reason-modal').show(); }, error: function(e){ $('.spinner-loading-overlay:eq(0)').remove(); // stop loader when ajax failed; }, }); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ $('.improvement-reason-modal').hide(); } $('.improve-modal--improvement').show(); }); function loadScript(src, callback) { var script = document.createElement('script'); script.src = src; script.onload = callback; document.head.appendChild(script); } function suggestionCall() { var suggest_val = $.trim($("#suggestion-section-textarea").val()); var array_String= suggest_val.split(" ") var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(suggest_val.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `

${suggest_val}

`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-section-textarea').val(""); jQuery('.suggest-bottom-btn').css("display","none"); // Update the modal content const modalSection = document.querySelector('.suggestion-modal-section'); modalSection.innerHTML = `

Thank You!

Your suggestions are valuable to us.

You can now also contribute to the GeeksforGeeks community by creating improvement and help your fellow geeks.

`; }, error:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 5 Words and Maximum Character limit is 2000."); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('#suggestion-section-textarea').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('

'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // load the captcha script and set the token loadScript('https://www.google.com/recaptcha/api.js?render=6LdMFNUZAAAAAIuRtzg0piOT-qXCbDF-iQiUi9KY',[], function() { setGoogleRecaptcha(); }); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('

'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.improvement-reason-modal').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); });

Most commonly used tags in HTML - GeeksforGeeks (2024)
Top Articles
18 Tips To Save Money In College You Wish You Knew Sooner | Dr. Breathe Easy Finance
Financial Steps to Take in the Wake of the Coronavirus Pandemic
Rosy Boa Snake — Turtle Bay
This website is unavailable in your location. – WSB-TV Channel 2 - Atlanta
It's Official: Sabrina Carpenter's Bangs Are Taking Over TikTok
Kokichi's Day At The Zoo
The Realcaca Girl Leaked
Wild Smile Stapleton
Lesson 1 Homework 5.5 Answer Key
Devourer Of Gods Resprite
My Vidant Chart
Aries Auhsd
Comenity Credit Card Guide 2024: Things To Know And Alternatives
2021 Lexus IS for sale - Richardson, TX - craigslist
Evangeline Downs Racetrack Entries
The Binding of Isaac
Bc Hyundai Tupelo Ms
Costco Gas Foster City
Gon Deer Forum
Grab this ice cream maker while it's discounted in Walmart's sale | Digital Trends
Q33 Bus Schedule Pdf
G Switch Unblocked Tyrone
Kountry Pumpkin 29
yuba-sutter apartments / housing for rent - craigslist
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Egizi Funeral Home Turnersville Nj
Getmnapp
Dexter Gomovies
The Clapping Song Lyrics by Belle Stars
Schooology Fcps
24 Hour Drive Thru Car Wash Near Me
Blush Bootcamp Olathe
Life Insurance Policies | New York Life
The Latest: Trump addresses apparent assassination attempt on X
Metro By T Mobile Sign In
Autotrader Bmw X5
Iban's staff
Los Garroberros Menu
Has any non-Muslim here who read the Quran and unironically ENJOYED it?
Casamba Mobile Login
Wasmo Link Telegram
O'reilly's Palmyra Missouri
Shipping Container Storage Containers 40'HCs - general for sale - by dealer - craigslist
Foxxequeen
Pink Runtz Strain, The Ultimate Guide
Noh Buddy
R/Gnv
Dagelijkse hooikoortsradar: deze pollen zitten nu in de lucht
Mit diesen geheimen Codes verständigen sich Crew-Mitglieder
Mkvcinemas Movies Free Download
Suzanne Olsen Swift River
Latest Posts
Article information

Author: Errol Quitzon

Last Updated:

Views: 5919

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Errol Quitzon

Birthday: 1993-04-02

Address: 70604 Haley Lane, Port Weldonside, TN 99233-0942

Phone: +9665282866296

Job: Product Retail Agent

Hobby: Computer programming, Horseback riding, Hooping, Dance, Ice skating, Backpacking, Rafting

Introduction: My name is Errol Quitzon, I am a fair, cute, fancy, clean, attractive, sparkling, kind person who loves writing and wants to share my knowledge and understanding with you.