The two main parts of a template are the content management code and the theme. These should be kept separate so that the theme can easily be changed without affecting the structure. For example, the styles should be defined in an external style sheet and not embedded in the HTML code of the pages. The structure of a website will be defined by a set of templates. It is good practise to make the templates modular rather than having page templates containing all the code for each page. This allows site-wide changes to be easily applied. For example, the footer may be mostly identical between pages.
CMS is friendly software used for managing the content of web design projects. You can also use CMS for keeping your documents and sharing them with your colleagues. For instance some information of your company is stored by means of CMS. So, each of your colleagues can add, change or update the content of your company‘s web site, its images and audio files. Here and now we see that CMS is acknowledged to be a necessary tool for managing web site content.