Open In App

Semantic-UI Form HTML Select Content

Improve
Improve
Like Article
Like
Save
Share
Report

Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is same as a bootstrap for use and has great different elements to use to make your website look more amazing. It uses a class to add CSS to the elements.

A form is the section of a document that contains a number of input fields such as text field, password, checkbox, etc. Semantic-UI form is used to create attractive forms using semantic-ui classes. It is very easy to design attractive forms.

The Semantic-UI Form HTML Select Content is used to display the list of elements in the select style option. It is used when JavaScript or ui dropdown option is not visible.

Semantic-UI Form HTML Select Content Used Element:

  • <select>: This element is used to create an HTML select content.

Syntax:

<div class="field">
    <select>
        <option> ... </option>
        ...
    </select>
</div>

Example 1: In this example, we will describe the use of Semantic-UI Form HTML Select Content.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Form HTML Select Content
    </title>
 
    <link href=
        rel="stylesheet" />
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Form HTML Select Content</h3>
    </div>
 
    <form class="ui container form">
        <div class="field">
            <select>
                <option value="">Select Your Subject</option>
                <option value="html">HTML</option>
                <option value="css">CSS</option>
                <option value="js">JavaScript</option>
                <option value="bootstrap">Bootstrap</option>
                <option value="angular">Angular.js</option>
                <option value="node">Node.js</option>
            </select>
        </div>
    </form>
</body>
 
</html>


Output:

Example 2: In this example, we will describe the use of Semantic-UI Form HTML Select Content.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        Semantic-UI Form HTML Select Content
    </title>
 
    <link href=
        rel="stylesheet" />
</head>
 
<body>
    <div class="ui container center aligned">
        <h2 style="color:green">
            GeeksforGeeks
        </h2>
 
        <h3>Semantic-UI Form HTML Select Content</h3>
    </div>
 
    <form class="ui container form">
        <div class="three fields">
            <div class="field">
                <label>First Name</label>
                <input type="text" name="fname"
                    placeholder="Enter First Name">
            </div>
            <div class="field">
                <label>Second Name</label>
                <input type="text" name="sname"
                    placeholder="Enter Second Name">
            </div>
            <div class="field">
                <label>Last Name</label>
                <input type="text" name="lname"
                    placeholder="Enter Last Name">
            </div>
        </div>
 
        <div class="two fields">
            <div class="field">
                <label>Email Id</label>
                <input type="email" name="email"
                    placeholder="Enter Email Id">
            </div>
            <div class="field">
                <label>Mobile No</label>
                <input type="number" name="number"
                    placeholder="Enter Mobile No">
            </div>
        </div>
 
        <div class="field">
            <select>
                <option value="">Gender</option>
                <option value="0">Male</option>
                <option value="1">Female</option>
                <option value="2">Others</option>
            </select>
        </div>
 
        <button class="ui button right" type="submit">
            Submit
        </button>
    </form>
</body>
 
</html>


Output:

Reference: https://semantic-ui.com/collections/form.html#html-select



Last Updated : 10 Mar, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads