VOOZH about

URL: https://www.geeksforgeeks.org/web-templates/create-a-button-group-using-html-and-css/

⇱ Create a Button Group using HTML and CSS - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Create a Button Group using HTML and CSS

Last Updated : 29 Nov, 2023

This article will show you how to create a Button Group with the help of HTML and CSS. To create the Button Group, first, we create buttons using the HTML <button> element and then apply some CSS styles to make all buttons in a group.

First, we create a div container with the class name .button-group that contains all buttons. Then we apply CSS styles, like - padding, margin, background, etc to make the button group.

Example: Here, we will create a Horizontal Button Group.

Output:

👁 Button-Group

Example 2: Here, we will create a Vertical Button Group.

Output:

👁 Button-Group-Vertical


Comment