My name is Elizabeth.

Sample Code

Microdata allows machine-readable data to be embedded in HTML documents in an easy-to-write manner, with an unambiguous parsing model.

At a high level, microdata consists of a group of name-value pairs. The groups are called items, and each name-value pair is a property.

Items and properties are represented by regular elements.


  <div id="microdataItem" itemscope>
  <p>My name is <span id="microdataProperty" itemprop="name">Elizabeth</span>.</p></div>
    function output() {
      if (!!document.getItems) {
        var T = document.getItems()[0];
        alert(T.properties.name[0]. itemValue);
      return false;
    <input type="button" value="Click" onClick="output()" />