Posted inProgramming / JavaScript / jQuery / Technology

how to create horizontal tabs in html?

Today, We want to share with you html tabs example with code.In this post we will show you how to create horizontal tabs in html, hear for html tabs without javascript we will give you demo and example for implement.In this post, we will learn about Bootstrap get active tabs index using jQuery with an example.

html tabs example with code using jquery

Example 1: tab link class in html




London is the capital city of England.




Paris is the capital of France.




Tokyo is the capital of Japan.

tab in html

tab link class in html

  /* Style the tab */
.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;

/* Style the buttons that are used to open the tab cartctdata */
.tab button {

  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;

/* Change background color of buttons on hover 
.tab button:hover {
  background-color: #ddd;


/* Create an active/current tablink class */
  background-color: #ccc;

/* Style the tab cartctdata */
.tabcartctdata {

  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;

I hope you get an idea about CSS3-Only Tabbed Area.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype