What is the Best Way to Add Structured Data to a Web Page?

By 3 years ago

Designing and building a webpage can be complicated. Structured data is when data is organized in a format in the database, specifically Google’s massive one, that makes it easier to process and analyze. This leads to a question that is frequently raised; is it possible to insert structured data at the bottom of the <body> tag instead of at the <head>?

JSON-ld is structured data that Google uses to read a webpage. Other data that can be similarly utilized is RDFa and Microdata.

The main difference between them is that both RDFa and Microdata use HTML attributes to nest data on the page, while JSON-ld is a JavaScript notation that can be embedded in a script tag. It can be implemented in both the head or body of the HTML document.

So, the answer to the question is yes; the JSON-ld structured data can be placed in either the head or the body of a web page.

Watch this short video from Google Webmasters for a quick overview of how to add structured data towards gaining knowledge graph elements in Search:


Ali Jaffar has been building dazzling websites and creating amazing online experiences for over a decade. His mastery of the latest innovations in web development results in world-class website experiences set apart by show-stopping style and seamless functionality. A highly sought-after consultant, Google Analytics qualified individual, and fifty-time award-winning web development guru, Ali lends his talents to build and bolster digital experiences for a wide array of clients, with a keen focus on web design for nonprofit organizations. When Ali’s not helping his clients grow or providing pro bono services via his Coding For Causes program, you can find him doing yoga, walking his dog, exploring beautiful open spaces, enjoying a nice bike ride, or writing pieces about technology, SEO, Web3 and the world on Huge Thinking and RunningSEO.