Post number #558565, ID: 0b422b
|
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?
Post number #558570, ID: b45408
|
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
Post number #558573, ID: 508efe
|
Also the official explanation is that HTML is meant to be the structure of the document while the CSS does all the visual parts
Post number #558605, ID: bda520
|
>>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
Post number #558640, ID: 4cb9d4
|
>>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.
Post number #558857, ID: aeb391
|
i miss <center>
Post number #558865, ID: 17c2fd
|
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.
Post number #558923, ID: 8727ff
|
just deprecate all of html already
Total number of posts: 8,
last modified on:
Tue Jan 1 00:00:00 1557267715
| 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?