HTML <option> with value Attribute

You are Here:

HTML <option> with value Attribute

The value attribute specifies the value to be sent to a server when a form is submitted.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <form action="/fruits.php" method="get"> <select name="myFruit"> <option value="Red(color)">Apple</option> <option value="Yellow(color)">Banana</option> <option value="Brown(color)">Sapodilla</option> </select> <button type="submit">Button</button> </form> </body> </html>

Attribute Value

ValueExplanation
textSpecifies the value to be sent to a server.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author