Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
How to add content to the end of select option tag's placeholder

I'm trying to add some content (ie, text or icon) to the end of the <option> tag placeholder but I'm not quite sure how to do this. I want to be clear that I am not talking about appending content after whatever is in the placeholder but instead at the end of the placeholder.

For example, imagine the option tag in the browser shows a certain size, ie whatever is in the between the square brackets shown below:

I'm not trying to append content after the default option as shown below,

[default option "some_extra_content"                ]

but instead I'm hoping to achieve something like:

[default option                 "some_extra_content"]

Is there a way I can do this? I've been searching for a long time but I haven't seen anything that is helpful. All I've got so far is shown below but it's just a normal <select>

<select>
    <option selected="selected" value="">Select your option "some_extra_content"</option>
    <option value="a">A</option>
    <option value="b">B</option>
</select>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

option HTML element: Permitted content Text, possibly with escaped characters (like é).

You can try to pad the middle with   (non breaking spaces)

<html>
    <head>
        <style></style>
    </head>
    <body>
        <select id="select1">
            <option id="option0" selected="selected" value="">
                Select your option
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"some_extra_content"
            </option>
            <option id="option1" value="a">
                A
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp; More TEXT
            </option>
            <option id="option2" value="b">
                B
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp; Bees knees
            </option>
        </select>
        <script></script>
    </body>
</html>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!