Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does adding id="ad_a" to a HTML element sometimes make it invisible in Chrome and Firefox?

Tags:

html

I bring to you a simple snippet of HTML:

<HTML>
<HEAD></HEAD>
<BODY>
<div id="ad_a">                 
    test DIV
</div>

test BODY

</BODY>
</HTML>

Yeah, there's no doctype or what have you, but none of that seems to matter for this strange behavior.

Can anybody please tell me why calling my div id="ad_(ANYTHING HERE)" hides everything inside this div? it just.. disappears.. It shows up in the page source but it doesn't show up on the loaded page..

I first noticed this in Google Chrome. Firefox seems to ignore it (for me at least, but my friend says it happens in his FF) my Internet Explorer 9 also ignores this div name and shows its content on the page.

What is going on and why does it do this?

Is this a commonly used thing? If so, what does it do?

like image 260
Partack Avatar asked Sep 01 '11 23:09

Partack


1 Answers

(Posting comment as answer at OP's request)

I'm going out on a limb here, but could an ad-blocking extension be interpreting the ad_ prefix as an advertisement and hiding it? I just ran the code in Chrome with all extensions disabled and it shows up as intended

like image 166
johnluetke Avatar answered Sep 27 '22 23:09

johnluetke