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?
Jason AndersTreehouse Moderator 145,192 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?