Primer CSS Form Groups Last Updated : 24 Apr, 2022 Comments Improve Suggest changes Like Article Like Report Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by object-oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system. Primer CSS Form Groups is used to create the form groups using the form header and form body. We can create the form group using the form-group class. In this article, we will discuss Primer CSS Form Groups. Primer CSS Form Groups Classes: form-group: This class is used to create the form group with some elements.form-group-header: This class is used to create the form group header.form-group-body: This class is used to create the form group body. Syntax: <form> <div class="form-group"> <div class="form-group-header"> .... </div> <div class="form-group-body"> .... </div> </div> </form> Example 1: The following example demonstrates the Primer CSS Form Groups. HTML <!DOCTYPE html> <html> <head> <title> Primer CSS Form Groups </title> <link rel="stylesheet" href= "https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> </head> <body> <div class="text-center"> <h1 class="color-fg-success"> GeeksforGeeks </h1> <h3> Primer CSS Form Groups </h3> <form> <div class="form-group"> <div class="form-group-header"> <label for="firstname"> First Name </label> </div> <div class="form-group-body"> <input class="form-control" type="text" placeholder="First Name" id="firstname" /> </div> </div> <div class="form-group"> <div class="form-group-header"> <label for="lastname"> Last Name </label> </div> <div class="form-group-body"> <input class="form-control" type="text" placeholder="Last Name" id="lastname" /> </div> </div> <div class="form-group"> <div class="form-group-header"> <label class="c-label" for="gender"> Gender: </label> </div> <div class="form-group-body"> <input id="gender" type="radio" name="gen" > Male <input id="gender" type="radio" name="gen" > Female </div> </div> </form> </div> </body> </html> Output: Primer CSS Form Groups Example 2: The following example demonstrates the Primer CSS Form Groups. HTML <!DOCTYPE html> <html> <head> <title> Primer CSS Form Groups </title> <link rel="stylesheet" href= "https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> </head> <body> <div class="text-center"> <h1 class="color-fg-success"> GeeksforGeeks </h1> <h3> Primer CSS Form Groups </h3> <form> <div class="form-group"> <div class="form-group-header"> <label for="address"> Address: </label> </div> <div class="form-group-body ml-6 mr-6"> <textarea class="form-control" id="address"></textarea> </div> </div> <div class="form-group"> <div class="form-group-header"> <label for="firstname"> Choices: </label> </div> <div class="form-group-body"> <label class="c-field c-field--choice"> <input type="checkbox" name="opt"> GFG 1 </label> <label class="c-field c-field--choice"> <input type="checkbox" name="opt"> GFG 2 </label> <label class="c-field c-field--choice"> <input type="checkbox" name="opt"> GFG 3 </label> </div> </div> <div class="form-group"> <div class="form-group-header"> <label for="drop"> Choose any: </label> </div> <div class="form-group-body"> <select class="form-select" id="drop"> <option> Choose any </option> <option> C++ </option> <option> Java </option> <option> Python </option> </select> </div> </div> </form> </div> </body> </html> Output: Primer CSS Form Groups Reference: https://primer.style/css/components/forms#form-groups Comment More infoAdvertise with us Next Article Primer CSS Form Groups harendra4373 Follow Improve Article Tags : Web Technologies CSS Primer-CSS Primer-CSS Component Similar Reads Primer CSS Forms Radio Group Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by 3 min read Primer CSS Inputs Forms Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by 2 min read Primer CSS Form Group Validation Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by 3 min read Pure CSS Form Grouped Inputs Pure CSS is a framework of CSS. It is a free and open-source tool collection for creating responsive websites and web applications. Pure CSS is developed by Yahoo and is used for creating faster, beautiful, and responsive websites. It can be used as an alternative to Bootstrap. In this article, we w 2 min read Primer CSS Button Groups Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. It is a system that assists us to build consistent user experiences efficiently with enough flexibility. This systematic approach e 4 min read Pure CSS Forms Forms are essential in websites to collect data or information for various purposes. Using Pure CSS we can create different types of forms. Pure CSS Forms Classes: Default Form Stacked Form Aligned Form Grouped Inputs Default Form: Add the class "pure-form" to any <form> element to create a de 4 min read Primer CSS General Formatting Primer CSS is a free open-source CSS framework that is built upon a GitHub design system to provide support to the broad spectrum of GitHub websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are stead 3 min read Primer CSS Selects Forms Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by 2 min read Primer CSS Kitchen Sink Forms Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by 2 min read Spectre Forms Input groups Spectre Forms Input groups are used to categorize the form field for example personal details, billing details. If the user wants to attach text and button along with input, add the input-group class to the input container. Add the input-group-addon class to the text element and input-group-btn to t 2 min read Like