You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: skip type="text/javascript" attribute in <script> tag of HTML output #5449
plotly.py's HTML output of the write_html() function currently adds a type attribute to the script tag, which is discouraged and causes a warning in the HTML validator: <script type="text/javascript">
Why should this feature be added?
Standard Javascript code is the default for the <script> tag in HTML, adding a type attribute to declare that default is unnecessary.
The current HTML5 spec explicitly discourages setting it:
"Omitting the attribute, setting it to the empty string, or setting it to a JavaScript MIME type essence match means that the script is a classic script, to be interpreted according to the JavaScript Script top-level production. Authors should omit the type attribute instead of redundantly setting it."
Activity
robertclaus commentedon Dec 17, 2025
@hannob this is a great callout. This might be a very simple change in the codebase if you are interested in opening a PR for it.
Remove unneeded `type="text/javascript"` attribute from `<style>` tag
hannob commentedon Dec 22, 2025
I tried a PR here: #5454
CI first failed due to a ruff formatting issue, which I fixed, now it fails with some doc issue, not sure why...
lalithu commentedon Jan 12, 2026
Hi! I’m new to contributing but happy to help debug the remaining CI/doc failure. I’ll try to reproduce it locally and report back.