Menu
HTMLHint LogoHTMLHintDocsPlaygroundGitHub
HTMLHint LogoHTMLHint
  • Docs
  • Playground
  • GitHub
  • User guide
    • Getting Started
    • Configuration
    • Rules
      • List of rules
      • Individual rules
        • alt-require
        • attr-no-duplication
        • attr-lowercase
        • attr-unsafe-chars
        • attr-value-double-quotes
        • attr-value-not-empty
        • doctype-first
        • empty-tag-not-self-closed
        • head-script-disabled
        • href-abs-or-rel
        • id-class-ad-disabled
        • id-class-value
        • id-unique
        • inline-script-disabled
        • inline-style-disabled
        • space-tab-mixed-disabled
        • spec-char-escape
        • src-not-empty
        • style-disabled
        • tag-pair
        • tagname-lowercase
        • title-require
    • Usage
      • Command Line Interface (CLI)
      • Options
    • Integrations
      • Editor integrations
      • Task runners

head-script-disabled

The script tag can not be used in head.

Level: warning

#Config value

  1. true: enable rule
  2. false: disable rule

The following pattern are not considered violations:

<body>
<script src="test.js"></script>
</body>

The following pattern is considered violation:

<head>
<script src="test.js"></script>
</head>
Edit this page
Last updated on 5/18/2020 by David Dias
Previous
« empty-tag-not-self-closed
Next
href-abs-or-rel »
  • Config value

Community

  • Stack Overflow
  • Discord
  • Twitter

More

  • HTMLHint organization
2021 HTMLHint. Built with Docusaurus.