Skip to content

Commit 2e09a9c

Browse files
committed
added resource download example
1 parent 0b92a33 commit 2e09a9c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

css.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,16 @@ <h2>9. applied rule-2</h2>
245245
<p>ref: <a href="">David Shariff</a> </p>
246246
</div>
247247

248-
<!-- <div id="div_span">
249-
<h2>10. span vs div</h2>
250-
<p><strong>Question:</strong> What is the difference between span, div?</p>
251-
<p><strong>Answer:</strong> div is a block element and span is inline element.</p>
252-
<p><strong>Extra:</strong> it is illegal to put block element inside inline element. div can have a p tag and a p tag can have a span. However, span can't have a div or p tag inside.</p>
248+
<div id="div_span">
249+
<h2>10. download resources</h2>
250+
<p><strong>Question:</strong> On page load, will mypic.jpg get downloaded by the browser?</p>
251+
<pre><code>
252+
&lt;style&gt;<br/> #test1 {<br/> display: none;<br/> }<br/> #test2 {<br/> background-image: url('mypic.jpg');<br/> visibility: hidden;<br/> }<br/>&lt;/style&gt;<br/>&lt;div id=&quot;test1&quot;&gt;<br/> &lt;span id=&quot;test2&quot;&gt;&lt;/span&gt;<br/>&lt;/div&gt;
253+
</code></pre>
254+
<p><strong>Answer:</strong> No.</p>
255+
<p><strong>reason:</strong> .</p>
253256
<p>ref: <a href="http://stackoverflow.com/questions/183532/what-is-the-difference-between-html-tags-div-and-span">Stackoverflow: div vs span</a> </p>
254-
</div> -->
257+
</div>
255258
<!-- <div id="div_section_article">
256259
<h2>11. div, section & article</h2>
257260
<p><strong>Question:</strong> When should i prefer div over section and vice versa?</p>

0 commit comments

Comments
 (0)