In order to improve the maintainability of a website, is it a good idea to separate all the text from the HTML and put it all in a unique CSS stylesheet? I mean, something like this:
HTML file
<body>
<h1 class="home-title"></h1>
<p class="description"></p>
<!-- and much more elements... -->
</body>
CSS file with all the text
.home-title:after {
content: "Welcome to my website!";
}
.description:after {
content: "This is a demo ok?";
}
...
No.
Style sheets are supposed to be used for the layout. The content should be in the HTML code.
Also, as jacktheripper pointed out, it would be a disaster for SEO purposes, as search engines will think that your page just contains a lot of empty elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With