<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ halloween - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ halloween - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 26 Jul 2026 20:14:36 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/halloween/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to make HTML disappear completely ]]>
                </title>
                <description>
                    <![CDATA[ We all want to disappear sometimes. HTML elements are no different. Sometimes they want to hide out for a while. Not cease to exist completely — just keep things on the down-low. Thankfully, when it comes to making HTML elements disappear, CSS offers... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-disappear-completely-2f23ddb14835/</link>
                <guid isPermaLink="false">66b8d3e3f8e5d39507c4c0f7</guid>
                
                    <category>
                        <![CDATA[ Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ halloween ]]>
                    </category>
                
                    <category>
                        <![CDATA[ startup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Wed, 12 Oct 2016 23:03:23 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*VcnMqhkSm-S1cMhlKmg1Aw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>We all want to disappear sometimes. HTML elements are no different. Sometimes they want to hide out for a while. Not cease to exist completely — just keep things on the down-low.</p>
<p>Thankfully, when it comes to making HTML elements disappear, CSS offers a variety of options.</p>
<h3 id="heading-the-css-of-becoming-invisible">The CSS of becoming invisible</h3>
<p>Let’s take an HTML element with the class “ghost” and hide it.</p>
<pre><code><span class="hljs-comment">//index.html</span>
</code></pre><pre><code>&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=”ghost”&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>I’m friendly!<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span></span>&lt;/div&gt;
</code></pre><pre><code><span class="hljs-comment">//style.css</span>
</code></pre><pre><code>.ghost {
</code></pre><pre><code>}
</code></pre><h3 id="heading-dead-pixels">Dead pixels</h3>
<p>By default, HTML elements are visible. Their default <strong>visibility</strong> CSS property is <strong>visible</strong>, but you can flip the script and go:</p>
<pre><code>.ghost {
</code></pre><pre><code>  visibility: hidden;
</code></pre><pre><code>}
</code></pre><p>Now the ghost is hidden, but it will still take up space on the page.</p>
<h3 id="heading-without-a-trace">Without a trace</h3>
<p>If you want to make something invisible, and also not take up any space, You can also use the CSS <strong>display</strong> property.</p>
<p>Developers usually use the display property to dictate whether an HTML element should be displayed as a block element or an inline element, but it can also hide the element completely:</p>
<pre><code>.ghost {
</code></pre><pre><code>  display: none;
</code></pre><pre><code>}
</code></pre><p>And unlike <strong>visibility: hidden</strong>, an element hidden with <strong>display: none</strong> won’t take up any space on the page.</p>
<h3 id="heading-see-through-souls">See-through souls</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/VvKVYtHZxvI6TxafCK-PM5JCKLfElNM0y6Oj" alt="Image" width="800" height="200" loading="lazy">
<em>Going, going, gone.</em></p>
<p>You can also make an element so transparent that it’s invisible using the <strong>opacity</strong> CSS property.</p>
<pre><code>.ghost {
</code></pre><pre><code>  opacity: <span class="hljs-number">0.0</span>;
</code></pre><pre><code>}
</code></pre><p>Like <strong>visibility: hidden, opacity: 0.0</strong> will leave an empty space where the HTML element is. Remember, with all of these techniques, the element remains a part of the DOM — it’s just not visible to normal users in their browsers.</p>
<h3 id="heading-run-away-run-far-far-away">Run away! Run far, far away!</h3>
<p>One final way you can hide an element is just to move it so far off the page that you would need to zoom out tremendously to see it.</p>
<p>To do this, first you use the <strong>position</strong> CSS property to give the element an <strong>absolute</strong> position on the page (as opposed to <strong>relative</strong> to other HTML elements).</p>
<p>Then you can move the element off the page an arbitrarily large number of pixels:</p>
<pre><code>.ghost {  <span class="hljs-attr">position</span>: absolute;  left: <span class="hljs-number">-999999</span>px;}
</code></pre><p>Why would you do this? Well, it’s good for the accessibility of your content. Screen readers — which visually impaired people use to browse the internet — can pick up this content, and everyone else won’t know the content is there.</p>
<p>For best results, position these invisible elements to the left instead of the top or bottom, which can confuse screen readers.</p>
<h3 id="heading-being-a-ghost-for-halloween">Being a ghost for Halloween</h3>
<p>When you put all 4 of these techniques together, you’ve got a pretty cool <a target="_blank" href="https://www.freecodecamp.com/shop">low-effort Halloween costume</a>:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/x7PSUq8ODURrsTF8jjGqHc1qU7XnXtgtY2hG" alt="Image" width="480" height="571" loading="lazy"></p>
<p>I made this with the help of Austin-based designer and camper Wes Searan.</p>
<p>You can <a target="_blank" href="https://www.freecodecamp.com/shop">pick one up</a> through the end of this weekend — in mens and fitted women’s sizes.</p>
<p><strong>I only write about programming and technology. If you <a target="_blank" href="https://twitter.com/ossia">follow me on Twitter</a> I won’t waste your time. ?</strong></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
