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
Sam Deighton II
25,602 PointsIs linking external html possible?
Say there is a <footer> element that wont change across pages, can you put that information in a html file and link to it and have that file add that information to the page? If so, is this bad practice?
1 Answer
Ricardo Hill-Henry
38,443 PointsIn the context you're speaking, I don't believe so. With a back-end language like PHP or Rails, you could chunk some html together and place it seamlessly on multiple pages, and update variables to change elements that should be changed on a new page ( titles, dates, etc.)
Sam Deighton II
25,602 PointsSam Deighton II
25,602 PointsThank you, that is what I thought. I have messed with PHP just enough to know how to achieve it that way but didn't know if it was possible with basic html. Thank you again.