CSS Treehouse Club: CSS My First Web Page Wrap Up

L Haney
L Haney
Full Stack JavaScript Techdegree Student 8,946 Points

What is the purpose of a "prefix" in an html file? For example... <html lang="en-US" prefix="og: http://ogp.me/ns#">

I was inspecting a random website (chefsavvy.com) and noticed at the top of the HTML file, it had a "prefix" attribute. What is the purpose of a "prefix" in an HTML file?

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 143,922 Points

Hi L Haney

This is used to implement the Open Graph Protocol. I haven't done much research on this, but here are a couple resources with some explanations. There is one on Quora and one from stackoverflow that I found.

It might also be of interest to point out that the web page you inspected (chefsavvy.com) is a site built with WordPress, so the template used for the site obviously can implement the OGP, thus it would need to have the prefix as part of the template.

It looks like an interesting protocol to read up on, and I wonder how many developers utilize it on their own, outside of WordPress Development?

:) :dizzy:

Very unsure I believe is use for open-graphs here is the website with a full explanation http://ogp.me/