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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML5: <mark>-Tag

Die HTML <mark>-Tag wird verwendet, um Text im HTML-Dokument hervorzuheben oder zu kennzeichnen, der besonders interessant oder relevant ist. Traditionell wird der Text, der im <mark>-Tag gefunden wird, von Browsern als Text mit gelbem Hintergrund dargestellt. Dieses Tag wird auch als <mark>-Element bezeichnet.

Online-Beispiel

Texthervorhebung

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 mark-Tagsverwendung (Grundlagen-Tutorial-Website oldtoolbag.com)</title>
</head>
<body>
<h1>Überschrift 1</h1>
<p>Der Mathematiktest findet am Freitag statt<mark>/mark>.</p>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Internet Explorer 9+, Firefox, Opera, Chrome and Safari support the <mark> Tag.

Note:Internet Explorer 8 and earlier versions do not support the <mark> Tag.

Tag definition and usage instructions

<mark> Tag defines marked text.

Please use the <mark> Tag when you need to highlight text.

Most browsers will display the <mark> Tag with a yellow background color, but you can change this behavior with CSS.
<mark> Tag defines text with relevance and is not intended to be used only for applying highlighter style. If you want to style text to highlight it, please use the <span> Tag and the correct CSS.

HTML 4.01 HTML5and

<mark> is the difference between HTML5 new tags.

global attributes

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

event attributes

<mark> Tag supports all HTML Event Attributes.