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

  • SEARCH
  • Home
  • 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

I start studing iOS last week and before I go any further I would
This is a further question based on this answer: How can I implement a
yes i know, making bitwise ops on double values seems like a bad idea,
Further to my last question I need to add in the .live() function as
Will there be any further resultset to process if the lookup table in the
Background (question further down) I've been Googling this back and forth reading RFCs and
To continue to question further I'm more interested in blogs, websites who once in
I am trying to further a question I asked yesterday where I wanted to
This question is related to the last point of Item 46 in Effective Perl
I have a very basic question how the creation of HTTPSession works.I know you

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.