Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8996429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:45:13+00:00 2026-06-15T23:45:13+00:00

I’m making a registration page in HTML. I’m using placeholder for inputs, but I

  • 0

I’m making a registration page in HTML. I’m using placeholder for inputs, but I am aware that some major browsers (IE <9, Firefox <3.7, Chrome/Safari <4.0) don’t support this HTML5 feature.

My favourite way to fallback for placeholder is this code, which doesn’t require any Modernizr or other JavaScript:

<audio>Username: </audio>
<!-- Fallback; won't be displayed by HTML5 browsers -->
<input type="text" placeholder="Username">
<!-- The placeholder will just be ignored by non-HTML5 browsers-->

The problem is that this registration form is into a table, and fallbacking doesn’t work – it shows the fallback text, too:

<table>
<tr>
    <audio>
        <td>
            Username:
        </td>
    </audio>
    <td>
        <input type="text" name="Username" placeholder="Username">
    </td>
</tr>
</table>

So, how should I do the fallback? I am aware of Modernizr and other JS libraries, but I’d prefer to avoid them due to the low upload speed of my server and as a general guideline.
Also, I didn’t consider using <td><audio>Fallback</audio></td> due to issues with the graphical issues (adds horizontal white space, also styling the td may give problems).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:45:14+00:00Added an answer on June 15, 2026 at 11:45 pm

    You don’t need any fallback if you have an explicit label for any input field, which is recommended for accessibility and usability.

    It would be rather strange to rely on the assumption that a browser supports the audio element if and only if it supports the placeholder attribute. For example, IE 9 supports audio but not placeholder.

    A more reasonable approach (to removing the label when placeholder is supported, which is IMHO a non-problem) is to add a piece of JavaScript that checks whether placeholder is recognized as an attribute and remove the label if it is. The risk with this is that a browser may recognize the attribute without actually supporting it. The safest way seems to be to create an input element in JavaScript and check whether the object has the placeholder property:

    <table>
    <tr id="row">
            <td id="label">
                <label for="username">Username:</label>
            </td>
        <td>
            <input type="text" name="Username" placeholder="Username" id="username">
        </td>
    </tr>
    </table>
    <script>
    if(!('placeholder' in document.createElement('input'))) {
      document.getElementById('row').removeChild(document.getElementById('label'));
    }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.