W3cubDocs

/Support Tables

dataset & data-* attributes

Method of applying and accessing custom data to elements.

Spec https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes
Status WHATWG Living Standard
IE Edge Firefox Chrome Safari Opera
      108 (1)    
    107 (1) 107 (1) TP (1)  
    106 (1) 106 (1) 16.1 (1)  
11 105 (1) 105 (1) 105 (1) 16.0 (1) 91 (1)
10 104 (1) 104 (1) 104 (1) 15.6 (1) 90 (1)
9 103 (1) 103 (1) 103 (1) 15.5 (1) 89 (1)
8 102 (1) 102 (1) 102 (1) 15.4 (1) 88 (1)
Show all
7 101 (1) 101 (1) 101 (1) 15.2-15.3 (1) 87 (1)
6 100 (1) 100 (1) 100 (1) 15.1 (1) 86 (1)
5.5 99 (1) 99 (1) 99 (1) 15 (1) 85 (1)
  98 (1) 98 (1) 98 (1) 14.1 (1) 84 (1)
  97 (1) 97 (1) 97 (1) 14 (1) 83 (1)
  96 (1) 96 (1) 96 (1) 13.1 (1) 82 (1)
  95 (1) 95 (1) 95 (1) 13 (1) 81 (1)
  94 (1) 94 (1) 94 (1) 12.1 (1) 80 (1)
  93 (1) 93 (1) 93 (1) 12 (1) 79 (1)
  92 (1) 92 (1) 92 (1) 11.1 (1) 78 (1)
  91 (1) 91 (1) 91 (1) 11 (1) 77 (1)
  90 (1) 90 (1) 90 (1) 10.1 (1) 76 (1)
  89 (1) 89 (1) 89 (1) 10 (1) 75 (1)
  88 (1) 88 (1) 88 (1) 9.1 (1) 74 (1)
  87 (1) 87 (1) 87 (1) 9 (1) 73 (1)
  86 (1) 86 (1) 86 (1) 8 (1) 72 (1)
  85 (1) 85 (1) 85 (1) 7.1 (1) 71 (1)
  84 (1) 84 (1) 84 (1) 7 (1) 70 (1)
  83 (1) 83 (1) 83 (1) 6.1 (1) 69 (1)
  81 (1) 82 (1) 81 (1) 6 (1) 68 (1)
  80 (1) 81 (1) 80 (1) 5.1 (1) 67 (1)
  79 (1) 80 (1) 79 (1) 5 66 (1)
  18 (1) 79 (1) 78 (1) 4 65 (1)
  17 (1) 78 (1) 77 (1) 3.2 64 (1)
  16 77 (1) 76 (1) 3.1 63 (1)
  15 76 (1) 75 (1)   62 (1)
  14 75 (1) 74 (1)   60 (1)
  13 74 (1) 73 (1)   58 (1)
  12 73 (1) 72 (1)   57 (1)
    72 (1) 71 (1)   56 (1)
    71 (1) 70 (1)   55 (1)
    70 (1) 69 (1)   54 (1)
    69 (1) 68 (1)   53 (1)
    68 (1) 67 (1)   52 (1)
    67 (1) 66 (1)   51 (1)
    66 (1) 65 (1)   50 (1)
    65 (1) 64 (1)   49 (1)
    64 (1) 63 (1)   48 (1)
    63 (1) 62 (1)   47 (1)
    62 (1) 61 (1)   46 (1)
    61 (1) 60 (1)   45 (1)
    60 (1) 59 (1)   44 (1)
    59 (1) 58 (1)   43 (1)
    58 (1) 57 (1)   42 (1)
    57 (1) 56 (1)   41
    56 (1) 55 (1)   40
    55 (1) 54   39
    54 (1) 53   38
    53 (1) 52   37
    52 (1) 51   36
    51 (1) 50   35
    50 49   34
    49 48   33
    48 47   32
    47 46   31 (1)
    46 45   30 (1)
    45 44 (1)   29 (1)
    44 43 (1)   28 (1)
    43 42 (1)   27 (1)
    42 41 (1)   26 (1)
    41 40 (1)   25 (1)
    40 39 (1)   24 (1)
    39 38 (1)   23 (1)
    38 37 (1)   22 (1)
    37 36 (1)   21 (1)
    36 35 (1)   20 (1)
    35 34 (1)   19 (1)
    34 33 (1)   18 (1)
    33 32 (1)   17 (1)
    32 31 (1)   16 (1)
    31 30 (1)   15 (1)
    30 29 (1)   12.1
    29 28 (1)   12
    28 27 (1)   11.6
    27 26 (1)   11.5
    26 25 (1)   11.1
    25 24 (1)   11
    24 23 (1)   10.6
    23 22 (1)   10.5
    22 21 (1)   10.0-10.1
    21 20 (1)   9.5-9.6
    20 19 (1)   9
    19 18 (1)    
    18 17 (1)    
    17 16 (1)    
    16 15 (1)    
    15 14 (1)    
    14 13 (1)    
    13 12 (1)    
    12 11 (1)    
    11 10 (1)    
    10 9 (1)    
    9 8 (1)    
    8 7 (1)    
    7 6    
    6 5    
    5 4    
    4      
    3.6      
    3.5      
    3      
    2      
Safari on iOS Opera Mini Android Browser Blackberry Browser Opera Mobile Android Chrome Android Firefox IE Mobile Android UC Browser Samsung Internet QQ Browser Baidu Browser KaiOS Browser
16.1 (1)                        
16.0 (1) all 105 (1) 10 (1) 64 (1) 105 (1) 104 (1) 11 13.4 (1) 18.0 (1) 13.1 (1) 13.18 (1) 2.5
15.6 (1)   4.4.3-4.4.4 (1) 7 (1) 12.1     10   17.0 (1)      
15.5 (1)   4.4 (1)   12         16.0 (1)      
15.4 (1)   4.2-4.3 (1)   11.5         15.0 (1)      
Show all
15.2-15.3 (1)   4.1 (1)   11.1         14.0 (1)      
15.0-15.1 (1)   4 (1)   11         13.0 (1)      
14.5-14.8 (1)   3 (1)   10         12.0 (1)      
14.0-14.4 (1)   2.3             11.1-11.2 (1)      
13.4-13.7 (1)   2.2             10.1 (1)      
13.3 (1)   2.1             9.2 (1)      
13.2 (1)                 8.2 (1)      
13.0-13.1 (1)                 7.2-7.4 (1)      
12.2-12.5 (1)                 6.2-6.4 (1)      
12.0-12.1 (1)                 5.0-5.4 (1)      
11.3-11.4 (1)                 4 (1)      
11.0-11.2 (1)                        
10.3 (1)                        
10.0-10.2 (1)                        
9.3 (1)                        
9.0-9.2 (1)                        
8.1-8.4 (1)                        
8 (1)                        
7.0-7.1 (1)                        
6.0-6.1 (1)                        
5.0-5.1 (1)                        
4.2-4.3                        
4.0-4.1                        
3.2                        

Notes

Partial support refers to being able to use data-* attributes and access them using getAttribute.

"Supported" refers to accessing the values using the dataset property. Current spec only refers to support on HTML elements, only some browsers also have support for SVG/MathML elements.

  1. While the HTML spec doesn't require it, these browsers also support dataset and data-* attributes on SVG elements, in compliance with current plans for SVG2

Bugs

  • Android 2.3 cannot read data-* properties from select elements.

  • Safari 10 and below can return undefined on properties of dataset in some cases. (See bug).

Resources

Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
https://caniuse.com/dataset