treehouse : what would you like to learn today?
Web Design Web Development iOS Development

How to create a template section in HTML

  • I am still developing my skills in HTML and CSS and I have been building a website in a text editor. I once used Dreamweaver while learning but I would much prefer a text editor like Sublime Text 2 or Notepad++, but every time I change any code in the header, nav or footer (because I didn't spend enough time planning before starting the code) I then have to change that section in all pages.

    I remember in Dreamweaver creating a 'template' section that any changes in that section reflected on all other pages on auto.

    Is it possible to create a template section in any of the other text editors, or a way to make any alterations change all pages?

    Or, is there another way to do it??

  • write each "section" in a separate file and assemble them later (if you're using PHP, for example, you can use include() to bring all of your templates together).