In index.html, create a element with the type set to application/ld+json in the of the page.To define the type of structured data, follow the steps below: Make sure to use the same casing as the examples. JSON-LD should be inside a element in either the or of the page. JSON-LD is used for data in a simple JavaScript-oriented object notation and is Google's preferred format for structured data. Structured data provides a way to standardize information about a page and classify the page content. Your content may also automatically enable a recipe badge for Google Images on mobile devices, voice guidance on the Google Home, and a content action on the Google Assistant. Recipe structured data can provide a rich result that can include rich information, like a description of your recipe, cooking and preparation times, and nutrition information. Since our sample site is a recipe blog, we're going to start with recipe structured data. Note: You don't need a Glitch account to edit the project files in Glitch. To create your own, editable copy of the project for this codelab, click Copy the Glitch project: The project files are stored in Glitch, which is a tool for creating web apps and code projects. You'll use a sample web page for this codelab. Basic understanding of HTML and JSON syntax.The sample code that is provided in this codelab.A recent version of Chrome or other modern web browser.How to test and validate structured data.How to add structured data to a simple HTML site.You should feel confident implementing other structured data types. The techniques you learn can help drive traffic to your site, not just recipe sites.Īt the end of the codelab, you'll have a sample site that's eligible for rich results in Google Search. We're going to focus on a recipe site for our example because it's easy to test and includes several add-on features, like reviews and carousels. This codelab walks you through adding several types of structured data to a simple HTML site, including where to place your structured data on a site and how to validate structured data. This is because search features depend on many factors, including the search device type, location, and whether Google Search thinks the feature would provide the best search experience for the user. Note: There is no guarantee that your page will appear in Search results with the specified feature. For example, a recipe page with valid structured data can be eligible to appear in a graphical search result, which we call a rich result in a host carousel: We also use structured data to enable special search result features and enhancements. You can help us by providing explicit clues about the meaning of a page with structured data. Google Search works hard to understand the content of a web page.
0 Comments
Leave a Reply. |