What’s the Deal with the <ins> Tag in HTML? (And Why Google AdSense Uses It)
If you’ve ever poked around in your website’s source code or inspected the output from Google AdSense, you might have stumbled upon a curious tag: <ins>
. At first glance, it might seem mysterious—especially since it’s not as commonly used as <div>
, <span>
, or even <section>
. So what exactly is this tag, and why does something as widely used as AdSense rely on it?
🧾 The Original Purpose of <ins>
The <ins>
tag in HTML stands for "inserted text." It’s part of a pair of semantic tags—<ins>
and <del>
—used to mark up changes in documents, especially when showing edits.
For example:
<p>The updated policy is <ins>now effective immediately</ins>.</p>
This indicates that the phrase inside <ins>
was added. Paired with <del>
(for deleted text), it can visually and semantically show changes:
<p>The price was <del>$19.99</del> <ins>$14.99</ins>.</p>
By default, browsers render <ins>
with an underline, and <del>
with a strikethrough.
🧩 But Why Does Google AdSense Use <ins>
?
Here’s where things get interesting.
In most AdSense setups, you’ll see code like this:
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXX"
data-ad-format="auto"></ins>
So, why not a <div>
or <span>
?
👉 Because <ins>
is an inline element that can be styled as block-level, and it carries no browser-imposed layout restrictions like other tags might. It also has a default visual appearance (an underline) that is easy to override with CSS. This makes it a neutral container that behaves well for dynamically inserted content—like ads.
In short, Google is not using <ins>
for its semantic meaning, but for practical and historical reasons. It’s a lightweight wrapper for where the ad will be rendered after the JavaScript (adsbygoogle.js
) takes over.
🛠️ Should You Use <ins>
in Your Own Code?
Unless you’re building:
- a document editor,
- a content diff viewer, or
- a CMS that highlights changes (like “track changes” mode),
…you probably won’t need to use <ins>
for its original semantic purpose.
If you're just building layouts or styling content, use <div>
or <span>
as needed. Don’t misuse <ins>
unless there's a specific reason—like third-party scripts that expect it (as with AdSense).
🧠 Final Thoughts and Considerations
- Accessibility: Some screen readers announce inserted and deleted text when
<ins>
or<del>
is used properly. So if you're using them for layout only, it might cause confusion for assistive technologies. - SEO impact: The tag itself doesn't carry special SEO value, but misuse or bloating your DOM unnecessarily can still hurt performance.
Custom styling: You can fully override its default underline using CSS:
ins {
text-decoration: none;
}
✅ Summary
<ins>
was made to represent newly inserted content.- Browsers render it underlined by default.
- Google AdSense uses it as a structural placeholder for ads, not for its original meaning.
- Unless you’re tracking document changes, you probably won’t need it.
Next time you see <ins>
in your source code, now you know—it’s not some strange anomaly. It’s just HTML doing what it does best: being flexible and a little quirky.
Comments ()