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 trialL Haney
Front End Web Development Techdegree Student 10,263 PointsWhat 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
Treehouse Moderator 145,860 PointsHi 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?
:)
Developer PM
Courses Plus Student 134 PointsVery unsure I believe is use for open-graphs here is the website with a full explanation http://ogp.me/