Email markup relies on structured data in emails. Gmail supports both JSON-LD and Microdata. You can use either format to mark up information in an email. This lets Google understand the fields and provide users with relevant search results, actions, and cards. For example, if the email is about an event reservation, you can annotate the start time, venue, number of tickets, and any other details that define the reservation.
Your first markup
Suppose you're responsible for sending Google I/O tickets to participants and you want to mark up semantic information in these emails. At a minimum, your ticket confirmation email contains HTML similar to the following:
<html>
<body>
<p>
Dear John, thanks for booking your Google I/O ticket with us.
</p>
<p>
BOOKING DETAILS<br/>
Order for: John Smith<br/>
Event: Google I/O 2013<br/>
When: May 15th 2013 8:30am PST<br/>
Venue: Moscone Center, 800 Howard St., San Francisco, CA 94103<br/>
Reservation number: IO12345<br/>
</p>
</body>
</html>
You can add structured information anywhere inside the <body> element of the
email HTML in any of the supported formats. The following code blocks show what
the marked-up email looks like:
JSON-LD
<html>
<body>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "EventReservation",
"reservationNumber": "IO12345",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "Event",
"name": "Google I/O 2013",
"startDate": "2013-05-15T08:30:00-08:00",
"location": {
"@type": "Place",
"name": "Moscone Center",
"address": {
"@type": "PostalAddress",
"streetAddress": "800 Howard St.",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94103",
"addressCountry": "US"
}
}
}
}
</script>
<p>
Dear John, thanks for booking your Google I/O ticket with us.
</p>
<p>
BOOKING DETAILS<br/>
Reservation number: IO12345<br/>
Order for: John Smith<br/>
Event: Google I/O 2013<br/>
Start