skip to Main Content

i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.
i m trying to do a HTML5 question in that i have to make a drop down option selected by default.

i tried to use the attribute "required" and "default"… bt still not working.

2

Answers


  1. Please post your code so far to have a better understanding of what your trying to accomplish.

    Login or Signup to reply.
  2. If I understand your question correctly, what you need is for a drop-down option to be selected by default and the solution is the following.

    Using selected

        <label>Choose an option:</label>
        <select>
            <option value="option1">Option 1</option>
            <option value="option2" selected>Option 2 (Selected by default)</option>
            <option value="option3">Option 3</option>
        </select>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search