danger/u/
This thread is permanently archived
deprecation in HTML

| why is it that some of the hotter tags in HTML are being labeled as "deprecated" in spite of usually being not only helpful, but also compatible with older browsers and smaller by size?
compare the following:
><font size=2>
><span style="font-size: 12px;">
why the *hell* would you ever want to do shit like this?


| Both your examples are frowned upon
You need to have a CSS class and add it like
> <span class="font-sm">
And in the CSS file you need
>.font-sm {
> font-size: 12px;
>}
Only do inline styling when you have to take precedence over an !important and also avoid the !important marker as much as possible, it's preferred to make a more specific CSS rule instead of using !important


| Also the official explanation is that HTML is meant to be the structure of the document while the CSS does all the visual parts


| >>558573
This, pretty much. When your HTML is being read by other machines or imported to a non-web context, you just need the content and structure, not the visual flair.

Separating structure and visual also helps development. Say you want to change how the page looks, you don't have to ctrl-f every instance of the font. Just change one line in CSS


| >>558570
that's absolute garbage if all i want to do is make a single line have a font size change - period.
>>558573
>>558605
fair, though that doesn't mean HTML's tags *can't* come in handy in contrast to CSS spans or classes, e.g. <center> which beats vertical-align or margin fiddling if you want to center a simple image or <div> real quick. the content and structure seperation is understandable, nonetheless.


| i miss <center>


| I love how many web devs are doing pure shit under the justification of "I prefer it". No wonder why the web is such crap.


| just deprecate all of html already

Total number of posts: 8, last modified on: Tue Jan 1 00:00:00 1557267715

This thread is permanently archived