2 ms·
The simplest way is to write subroutines to generate the HTML. But it's probably better to use templates; you stick your standard HTML "boilerplate" into one t
by kragen 15y ago
The simplest way is to write subroutines to generate the HTML. But it's probably better to use templates; you stick your standard HTML "boilerplate" into one template and use a templating library to interpolate stuff into the middle of it, instead of making a zillion copies and editing each one.
As for CSS, most of the time CSS's own cascading facility is sufficient to separate your "standard" CSS into one file and your other CSS in another file. But when it's not, there's also stuff like Sass.