HTML5 Mark Element

2019-08-27 17:09发布

Which browsers and their versions, IE, FF Google Chrome, Opera, for example, FireFox 2.0, 3.0 support the mark element?

标签: html html5
2条回答
你好瞎i
2楼-- · 2019-08-27 17:19

Let's see! http://browsershots.org/http://jsbin.com/evixu4 (results pending)

Test code:

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
  <p id="hello">Hello <mark>World</mark></p>
</body>
</html>

As rendered on Chrome 10.0.648.204 on Windows 7:

enter image description here


Edit w/Browsershots results

All browsers tested will render text inside of <mark> (as is typical for rendering unknown elements). The following are the browsers tested, with items in bold indicating which browsers apply special styling (in all cases tested, this means a yellow background) to <mark> elements. Presumably, the highlighted style indicates that the browser supports the element.

Chrome

  • Chrome 5.0.375.99 (Debian)
  • Chrome 9.0.597.107 (Windows XP)
  • Chrome 10.0.648.133 (Ubuntu)
  • Chrome 10.0.648.204 (Windows XP)
  • Chrome 11.0.696.16 (Ubuntu)
  • Chrome 12.0.712.0 (Ubuntu)

Firefox

  • Firefox 1.0.8 (Ubuntu)
  • Firefox 2.0.0.20 (Windows XP)
  • Firefox 2.0.019 (Ubuntu)
  • Firefox 3.0.3 (Ubuntu)
  • Firefox 3.5.8 (Ubuntu)
  • Firefox 3.6 (Windows XP)
  • Firefox 3.6.10 (Ubuntu)
  • Firefox 4.0 (Debian)
  • Firefox 4.0 (Windows XP)

IE

  • IE 6.0 (Windows XP)
  • IE 7.0 (Windows XP)
  • IE 8.0 (Windows XP)
  • IE 8.0 (Windows 7)

Opera

  • Opera 8.54 (Windows XP)
  • Opera 9.63 (Debian)
  • Opera 9.80 (Ubuntu)
  • Opera 9.80 (Windows XP)
  • Opera 10.00 (Debian)
  • Opera 10.60 (Debian)
  • Opera 11.01 (Ubuntu)

Safari

  • Safari 4.0 (Windows XP)
  • Safari 5.0.4 (Windows XP)
  • Safari 5.0.4 (Windows 7)

(In case it's not obvious, results are sorted by brand, then version, then OS tested.)


All screenshots (zipped): https://github.com/downloads/mjball/Stack-Overflow-Q-A/110331-103924-jsbin.com-6183471.zip

查看更多
狗以群分
3楼-- · 2019-08-27 17:19

As of today, IE 9, FF 4, and Chrome 12 support it, but Safari 5 does not. Tested using most current versions of browsers on a Win 7 box. They render it like a yellow highlighter.

查看更多
登录 后发表回答