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 255865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:57:58+00:00 2026-05-11T21:57:58+00:00

Further to my last question , I’d like to know if current browsers can

  • 0

Further to my last question, I’d like to know if current browsers can read attribute values without any quotes, even if the value contains slashes, like:

 <script src=/path/to/script.js type=text/javascript></script>

Will it work without causing a DOM parsing error and corrupting the entire document?

  • 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-05-11T21:57:59+00:00Added an answer on May 11, 2026 at 9:57 pm

    It is valid in HTML4/5 as long as their are no spaces in the value. It is not valid in XHTML though it is still properly rendered on some (all?) browsers.

    Using a quick sample HTML doc (at end of answer), I tested this with Firefox 3.5 Beta 4, Google Chrome 2, and IE 7. The sample doc was also tested with HTML 4 Strict, HTML 4 Transitional, HTML 5, and XHTML doc types. All were rendered successfully.

    Some other things to consider…

    Many modern browsers attempt to render pages in standards compliant mode. If you’re trying to use XHTML, and you use unquoted values, browsers will revert back to quirks mode, possibly affecting the rendering of your otherwise standards compliant documents. As browsers become more and more standards compliant as well, future specs may look to deprecate unquoted values.

    Additionally, in some web frameworks, applications may be parsing templates prior to serving them up. Again, if these parsers are expecting valid XHTML, this type of thing could cause failures.

    As long as you are sticking to HTML and not XHTML you should be fine without quotes, but there is no guarantee what will happen with XHTML browser to browser. Adding quotes seems like a small cost and keeps your code generally in line with standards for the future.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>No Quotes Test</title>
    </head>
    <body>
    <input type="text" value="with/quotes and spaces" ></input>
    <input type=text value=no/quotes and spaces ></input>
    <input type=text value=no/quotes_no_spaces ></input>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Further to my question on disabling validators using javascript - Disable ASP.NET validators with
Taking shs's question a step further... Why isn't all government sponsored software open source?
I'm quoting myself on a previous question I asked to further explain: I'm trying
Update: Thanks for the suggestions guys. After further research, I’ve reformulated the question here:
Further to How to Pass Command Line Parameters in batch file how does one
With a view to avoiding the construction of further barriers to migration whilst enhancing
I just had some basic php questions to further my understanding as I learn,
With reference to Problem with date day/month reversing on save I have further noted
I have a jquery menu that has so many entries that it extends further
Summary Hi All, OK, further into my adventures with custom controls... In summary, here

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.