Separate Structure from Content

To be an efficient web developer, you need to know how to separate structure from content.

Take a look at the picture below that highlights the structure components of a webpage.

HTML Structure
The structure of the HTML is highlighted.

The next picture highlights the content.

HTML Content
The content of the HTML is highlighted.

These are the two things you should learn to separate. Knowing how to separate structure from content will create a more powerful web experience.

Why is it more powerful? Suppose you have a thousand webpages like the one pictured above. All the structure is the same, but your content is different for each page. Now, suppose you decide the <h2> is too big, and you want to change it to an <h3> tag. Well, you just created lots of work for yourself. You have lots of repetitive editing to do. However, if you separate structure from content, you will avoid this problem.

The idea is to create a template for the separate structure. This template can then be used to display as much content as you want. Therefore, if you need to change the structure, you only have to edit it once.

Leave a Reply

Your email address will not be published. Required fields are marked *