How to include meta data in HTML tags

Viewed 260

I plan to use a headless-CMS to manage content on my website, so a non-technical content editor will be able to independently maintain content.

To assist the content editor map content between the website and the CMS, I need to inject a CMS ID into HTML tags. (thinking that the content editor will view the page source to find the value)

What is the standard way to inject meta data into a HTML tag?

E.g. <p cms-id=7adQpNPZxP4jK28RLp3wES></p>

3 Answers

The <meta> tag defines metadata about an HTML document. Metadata is information about data.

<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.

Contentful DevRel here.

The rendering has to be done by your server. Depending on the technology you use you have to place the id in the website. It's hard to give advice without knowing what you use to render the HTML.

Related