Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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,624 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?