May 03, 2021 HTML5
2. Label definition and instructions for use
4. The difference between HTML 4.01 and HTML5
The use of labels:
<script>
document.write("Hello World!")
</script>
<noscript>抱歉,你的浏览器不支持 JavaScript!</noscript>
Most browsers currently support the hashtag.
The noscript element is used to define alternate content (text) when the script is not executed.
This tag can be used by browsers that can identify the hashtag but cannot support the scripts in it.
Tip: If the browser supports the script, it does not display text in the noscript element.
Note: Browsers that do not recognize the label will display the contents of the label on the page. T o prevent the browser from doing so, you should hide the script in the comment label. Older browsers (which don't recognize the hashtag) ignore comments so that the contents of the tags are not written to the page, while new browsers know how to execute these scripts, even if they're surrounded by comment tags!
In HTML 4.01, the label is only allowed to be inserted into the element.
In HTML5, the labels can be inserted into the .lt;head> and slt;body?gt; regions.
XHTML does not support the label.
The label supports global properties and views the full property sheet HTML global properties.
HTML tutorial: HTML script