function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suhas GB 6Suhas GB 6 

In visualforce page how can we display header for selectList?

In my visualforce page I'm displaying the selectlist with the selectOptions, but on top of the selectList I want to display the heading for the selectlist (i.e. something like "Available Accounts") which has to be a in-built functionality. I tried title and label attribute on the selectList to display the headings but it didn't display. So how can I display the heading for selectList?
 
SarvaniSarvani
Hello Suhas,

The built in fucntionality works only when you are using standard controller. However, it should work with attributes like label. Try using the code below where you need the text to appear beside your select options tag.
<span style="size:20px;font-weight:bold;"> Available Accounts: </span>

Hope this helps, 

Thanks,
Sarvani