Title: [Plugin: Portfolio Slideshow] XHTML validation error: &#039;noscript&#039; element
Last modified: August 20, 2016

---

# [Plugin: Portfolio Slideshow] XHTML validation error: 'noscript' element

 *  Resolved [paultraf](https://wordpress.org/support/users/paultraf/)
 * (@paultraf)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-portfolio-slideshow-xhtml-validation-error-noscript-element/)
 * Hello,
 * I have been trying out Portfolio Slideshow and it works nicely. Thank you. The
   only issue is that my theme specifies a document type of XHTML1.0 and the W3C
   Validator complains: _document type does not allow element “noscript” here; assuming
   missing “object” start-tag_. I guess it’s because the XHTML DTD doesn’t allow‘
   noscript’ inside the ‘head’ element.
 * I appreciate the value of the ‘noscript’ alternative, so I wonder if this code
   could be moved into the main body? Or might there be some other approach?
 * At the end of the day, it’s not a big issue, but perhaps there is a simple solution?
 * – Paul
 * [http://wordpress.org/extend/plugins/portfolio-slideshow/](http://wordpress.org/extend/plugins/portfolio-slideshow/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [paultraf](https://wordpress.org/support/users/paultraf/)
 * (@paultraf)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-portfolio-slideshow-xhtml-validation-error-noscript-element/#post-2381019)
 * I delved a bit further and worked out that in portfolio-slideshow.php the function
   _portfolio\_head()_ adds the code as an action to _wp\_head()_. So in my theme
   functions.php file I removed it: `remove_action( 'wp_head', 'portfolio_head');`
 * Then in a template file I reinserted that code within the body of the page, just
   before the slideshow itself is inserted. It now doesn’t give validation errors.
   Actually, I’m intending to use it on the home page, where rather than a list 
   of images, I’d just prefer a single image, so in my case I shall probably change
   the noscript bit accordingly.
 * This is the first time I’ve looked at wp_head, so I don’t know if this is appropriate.
 * – Paul
 *  Plugin Contributor [Dalton Rooney](https://wordpress.org/support/users/daltonrooney/)
 * (@daltonrooney)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-portfolio-slideshow-xhtml-validation-error-noscript-element/#post-2381020)
 * Hi Paul,
    The plugin is coded against HTML5, where a noscript tag is valid in
   the header. It’s not valid in XHTML, but it works, so we’ve left it there.
 * The problem with your solution is that inserting styles in the body of the document
   is also invalid, so while it may work (and even validate?) it’s not technically
   correct either.
 * I suppose the only truly valid way to do it would be with a script like modernizr,
   but since every site I’ve worked on in the last two years has had an HTML5 doctype(
   including sites using TwentyTen and TwentyEleven) it hasn’t been an issue.
 * Cheers,
    Dalton
 *  Thread Starter [paultraf](https://wordpress.org/support/users/paultraf/)
 * (@paultraf)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-portfolio-slideshow-xhtml-validation-error-noscript-element/#post-2381036)
 * Hi Dalton,
 * Thanks for taking a look at this.
 * Yes, you are right and sorry I was mistaken about moving ‘noscript’ into the 
   body of the document – that gives a validation error also. I think, though, I’ll
   still move the code out of the head section as for this site I shall stick to
   the XHTML document type.
 * But it is a prompt to give more consideration of HTML5 in other projects …
 * – Paul

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Portfolio Slideshow] XHTML validation error: 'noscript' element’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/portfolio-slideshow_ffffff.svg)
 * [Portfolio Slideshow](https://wordpress.org/plugins/portfolio-slideshow/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/portfolio-slideshow/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/portfolio-slideshow/)
 * [Active Topics](https://wordpress.org/support/plugin/portfolio-slideshow/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/portfolio-slideshow/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/portfolio-slideshow/reviews/)

## Tags

 * [markup](https://wordpress.org/support/topic-tag/markup/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 3 replies
 * 2 participants
 * Last reply from: [paultraf](https://wordpress.org/support/users/paultraf/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-portfolio-slideshow-xhtml-validation-error-noscript-element/#post-2381036)
 * Status: resolved