Is there a way to display a drop down grid in html

Everybody knows how a dropdown menu works where a person clicks on the drop down menu and it displays a drop down list where the user can select an option from the list. What I want to know is that is there a way in html where except displaying a dropdown list can I display a grid instead with the options in the grid? I havn’t got any code for this but if anyone knows this is possible and can provide an example of this I would be very greatful and it would be very helpful.

This link will show you how I want it to be dislayed like but I do not know how this is done.

Click here

If you google something like ‘colour palette javascript’ you’ll get a lot of examples.

Or you can create your own in html and attach an onclick event handler to each colour to do whatever you need to with the chosen colour.

hi,

it is not for colors, that is just an example of what the drop down grid looks like. I am putting letters a to z in the grid. I will however do what you said and look through google for colour pallette javascript. For html and on click event do you know to display the grid? will it require creating a table to create the grid?

Thank You

There are a few ways you could make the grid. In this case you could justify using a table because the grid will be displaying tabular data. Other options to make the grid include using inline elements or floated elements.

ok I will hava a look into this, I don’t know if you know from experience but are you allowed to put <option> tags inside a <table> which will be inside a <select> tag? In other words can a table be displayed in a <select> tag?

afaik, the only elements allowed in a <select> are <option> elements and you can’t display a table inside an <option>

ok thanks for your help, I will do some more research on this :slight_smile: