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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:35:54+00:00 2026-05-25T15:35:54+00:00

I read an article that suggested working around a method that is not strictly

  • 0

I read an article that suggested working around a method that is not strictly valid (target="_blank") by applying the rules after pageload via javascript.

That strikes me as a large case of using the letter of the law to defeat the spirit of the law, but I don’t want to criticize before knowing if it’s really a problem. Is there something about code validation that makes it only matter before any scripts have executed?

  • 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-25T15:35:54+00:00Added an answer on May 25, 2026 at 3:35 pm

    Try to make your page as valid as possible. You don’t make it valid for W3, but for your users. Invalid HTML needs to be corrected by the browser to be displayed. Every browser may do this differently, so invalid markup may (theoretically) result in your page looking different in each browser.

    If you add the markup from JavaScript, it will be just as invalid and it gives you the same risk. The only thing you did, is trick the W3 validator, because it won’t execute the Javascript. So in fact, it tests another page than your users will see. If you do that, your validation is useless.

    That said, I believe target="_blank" works in most any browser, so if you really need it, and can’t change the doc type, well, you’ll just have to live with that one error you get from the validator.

    And then again, the markup itself looks ok (no omitted elements, everything is nicely escaped and quotes), so it’s just a single attribute that may be ignored by the browser. Worst case, the browser will ignore the target. Theoretically a browser could fail to render the page, but in this case that is very unlikely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure that I understand Isolated storage. I read the article http://msdn.microsoft.com/en-us/library/3ak841sy%28VS.80%29.aspx
I've just read an article that supposedly introduced me to a new concept: Up
I read in this article that a company has created a software capable of
I have read from some article that say's Apple doesn't approve the application which
I read in an article somewhere that trig calculations are generally expensive. Is this
Recently i read an article is about prevent brute-force attack. It said that automatically
From the Wikipedia article on Read-Copy-Update : The reason that it is safe to
I've read the MSDN article about the layouts pass, that states: When a node
I read this article, it suggests (page 1025 last paragraph) that there is a
I read an article that says memory allocated on heap needs additional memory for

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.