English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <noscript> Tag

HTML <noscript>-Tag definiert den alternativen HTML, der in Fällen eingefügt wird, in denen der Skripttyp nicht unterstützt wird oder der Browser Skripts deaktiviert hat. Dieser Marker wird auch als <noscript>-Element bezeichnet.

Online-Beispiel

<noscript> Tag verwenden:

!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Verwendung des <noscript>-Tags (Grundlagen-Tutorial-Netz oldtoolbag.com)</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is a paragraph that appears under Heading 1.</p>
<script src="/js/examples.js"></script>
 <script>document.write("Hello World!")</script>
<noscript>
  <p>This is a <a href="examples.html">link to more examples</a>.</p>
</noscript>
<noscript>Entschuldigung, Ihr Browser unterstützt JavaScript nicht!<//noscript>
</body>
</html>
Testen Sie es heraus ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Derzeit unterstützen die meisten Browser das <noscript>-Tag.

Definition und Verwendung des Tags

Der Marker "noscript" wird verwendet, um alternativen Inhalt (Text) zu definieren, der angezeigt wird, wenn Skripte nicht ausgeführt werden.

Dieser Marker kann verwendet werden, um Browser zu erkennen, die das <noscript>-Element erkennen, aber die darin enthaltenen Skripts nicht unterstützen.

Wenn der Skripttyp nicht unterstützt wird oder der Browser Skripts deaktiviert hat, wird der Marker <noscript> alternativen HTML-Inhalt anzeigen.

Wenn Skripts im Browser aktiviert sind, wird der Marker <noscript> den Inhalt auf der Seite nicht anzeigen.

Siehe auch<script>-Tag.

Hinweise und注意事项

Hinweis:Wenn der Browser Skripts unterstützt, wird der Text im Element "noscript" nicht angezeigt.

注释:Browsers that do not recognize the <script> tag will display the content of the tag on the page. To prevent the browser from doing this, you should hide the script in comment tags. Older browsers (those that do not recognize the <script> tag) will ignore comments, so the content of the tag will not be written to the page, while newer browsers will understand these scripts, even if they are enclosed in comment tags!

<script>
<!--
function displayMsg()
{
alert("Hello World!")
}
//-->
</script>

In HTML 4.01 and HTML5 Differences between

In HTML 4.01 In, the <noscript> tag is only allowed to be inserted into the <body> element.

In HTML5 In, the <noscript> tag can be inserted into the <head> and <body> areas.

Differences between HTML and XHTML

XHTML does not support the <noscript> tag.

Global Attributes

<noscript> Tag supports global attributes, see the complete attribute table HTML Global Attributes.

Related Articles

HTML Tutorial:HTML Script