HTML and CSS Reference
In-Depth Information
5.
Finally add a
content
attribute, and set its value to
Joe's Pizza Co.
(including the period). The new
line should like this:
<meta id="company-name" itemprop="name"
content="Joe's
Pizza Co."
>
6.
Locate the
<section>
elements with the following IDs:
location1
,
location2
, and
location3
.
7.
Add the
itemscope
attribute to each of these elements. Remember that you do not need to give this attrib-
ute a value.
<section id="location1"
itemscope
>...</section>
8.
Now add an
itemtype
attribute to each of these
<section>
elements and set the values to
ht-
tp://schema.org/LocalBusiness
.
<section id="location1" itemscope
itemtype="
http://schema.org/LocalBusiness
">...</section>
9.
Finally, you need to add an
itemref
attribute to each of the
<section>
elements and set its value to
“company-name”
. This will link the
<meta>
element you created earlier to each of these LocalBusiness
items, therefore setting the company name without the need for three separate elements. Here's the new
code for
location1
:
<section id="location1" itemscope
itemtype="http://schema.org/LocalBusiness"
itemref="company-name"
>
10.
Locate the
<h1>
element within the first
<section>
element you found in Step 6.
11.
Add the
itemprop
attribute to this element and set its value to
address
.
<h1
itemprop="address"
>310 West 38th Street, NY</h1>
12.
Add the
itemscope
attribute to this element.
<h1 itemprop="address"
itemscope
>310 West 38th Street, NY</h1>
13.
Add the
itemtype
attribute to this element and set its value to
http://schema.org/PostalAd-
dress
. This creates a new PostalAddress item within your original LocalBusiness item.
<h1 itemprop="address" itemscope
itemtype="http://schema.org/PostalAddress"
>
310 West 38th Street, NY
</h1>
14.
You now need to mark up the address within this
<h1>
element. Create a new
<span>
element around
the text that comes before the comma (
310 West 38th Street
).
<h1 itemprop="address" itemscope
itemtype="http://schema.org/PostalAddress">
<span>
310 West 38th Street
</span>
, NY
</h1>
15.
Add an
itemprop
attribute to this
<span>
element and set its value to
streetAddress
.
<h1 itemprop="address" itemscope
itemtype="http://schema.org/PostalAddress">
<span
itemprop="streetAddress"
>310 West 38th Street</span>, NY