TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why do I see so much crazy inline styling on websites these days?

16 pointsby TicklishTigerabout 6 years ago
I just googled for &#x27;cloud hosting&#x27; and landed here:<p>https:&#x2F;&#x2F;try.digitalocean.com&#x2F;cloud-hosting&#x2F;<p>I&#x27;m often curious how the source of a page looks like. So I inspected the headline &quot;Cloud hosting developers love.&quot;.<p>This is what I found:<p>&lt;h1 style=&quot;line-height: 77px;&quot;&gt; &lt;span style=&quot;font-size: 60px; letter-spacing: -1.33px;&quot;&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;&lt;span class=&quot;ub-dynamic&quot;&gt;Cloud&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span style=&quot;font-size: 72px; letter-spacing: -1.33px;&quot;&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span style=&quot;font-size: 60px; letter-spacing: -1.33px;&quot;&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;hosting&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;br&gt; &lt;span style=&quot;font-size: 60px; letter-spacing: -1.33px;&quot;&gt;&lt;span style=&quot;color: rgb(255, 255, 255);&quot;&gt;developers love.&amp;nbsp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;&#x2F;h1&gt;<p>I find this kind of crazy inline styling and absurd choice of elements pretty often these days. Why? What is going on?

9 comments

sonecaabout 6 years ago
It is a good practice for static pages focused on performance (e.g. landing pages like this one) that the critical CSS is inline. It is common that all CSS for above the folder content is inline - usually done through a processor, so the development code is kept sane.<p>A kind of old, but relevant source: <a href="https:&#x2F;&#x2F;developers.google.com&#x2F;speed&#x2F;pagespeed&#x2F;service&#x2F;PrioritizeCriticalCss" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;speed&#x2F;pagespeed&#x2F;service&#x2F;Priori...</a>
hrbrmstrabout 6 years ago
That particular page appears to have been created with &quot;Unbounce&quot; (<a href="https:&#x2F;&#x2F;preview.unbounce.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;preview.unbounce.com&#x2F;</a>) (the &quot;lp-*&quot; strings give that away). If you look for said &quot;lp-&quot; strings on the web there are more than a few pages using them. Unbounce is primarily designed for creating HTML email that won&#x27;t break and won&#x27;t get auto-rejected and it&#x27;s likely easier for the builder program to stick in hardcoded values in-tag than to rely on complex CSS, especially with the varied capabilities of mail clients.
shooabout 6 years ago
&gt; crazy inline styling and absurd choice of elements pretty often these days<p>i&#x27;d be interested to hear what objectively measurable properties this way of doing things might suffer from. e.g.<p><pre><code> 1. does it result in more data being sent over the wire? 2. does it result in slower page load speed? 3. is it less widely supported by browsers? 4. is it harder to maintain? </code></pre> It&#x27;s a bit hard to assess if this is easy to maintain without knowing how the page is generated. Maybe it&#x27;s built by some pipeline that is very easy for the developers to maintain &amp; easy for people to tweak the styles...<p>(context: genuine interest, backend dev who has largely dodged having to care about html for the last n years...)
CraftThatBlockabout 6 years ago
Also, many React libraries automatically inline styles when server-side rendered, to (as mentioned by other commenters) improve page performance. The developers working on the page most likely didn&#x27;t write the style directly inline, but was added in compilation, through a library, or using React&#x27;s style prop.
craftomanabout 6 years ago
Seems like it was generated by some kind of a WYSIWYG editor or maybe it&#x27;s just another simple obfuscating tool designed for simple scrappers.
notahackerabout 6 years ago
Inlining of &quot;critical&quot; css is favoured for page load speed, but not like that...
LarryMade2about 6 years ago
Might be for use on web and email advertisements where inline styling is a necessity.
Khelavasterabout 6 years ago
From a WYSIWIG editor or the result of manual PSD2HTML conversion.
pesfandiarabout 6 years ago
Most likely the product of server-side automated styling.