From the course: HTML: Structured Semantic Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Writing JSON-LD by hand

Writing JSON-LD by hand - HTML Tutorial

From the course: HTML: Structured Semantic Data

Start my 1-month free trial

Writing JSON-LD by hand

- [Instructor] Google's preferred methodology for structured data is through JSON-LD. Not only is this information useful for webpages, it's becoming important for home devices like Alexa and Google Home. Even if you're not a JavaScript person, writing the JSON-LD document is a relatively straightforward thing to do. In this video, I'll get you started writing it by hand. But there's also tools that will write the code for you. And I'll cover those in later videos. First of all, let's get our JSON-LD into the web page. This form of JavaScript may be embedded in the head of your document, or just before the slash body tag. Either is fine, but it should not be linked to a file, as you might do for other JavaScript in your document, why? Because the JSON-LD is specific to this page only. In other words, if you have 100 pages on your website, and you want every page to have structured data, then you'd have to embed a JSON-LD script on every one of those hundred pages individually, It's…

Contents