Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Treehouse Club: CSS My First Web Page Wrap Up

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 145,858 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/