You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css.html
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -80,18 +80,16 @@ <h2>css related interview questions</h2>
80
80
<li><a href="#standard_quirks">Explain standard and quirks mode.</a></li>
81
81
<li><a href="#semantic_html">Array methods in string?</a></li>
82
82
</ol> -->
83
-
<!-- <div id="doctype">
84
-
<h2>1. doctype</h2>
85
-
<p><strong>Question:</strong> What is doctype? why do u need it?</p>
86
-
<p><strong>Answer:</strong> doctype is a instruction to the browser to inform about the version of html and how browser should render it.</p>
87
-
<p>It ensures how element should be displayed on the page by most of the browser. And it also makes browsers life easier. otherwise, browser will guess and will go to <a href="http://en.wikipedia.org/wiki/Quirks_mode">quirks mode</a>. Moreover, doctype is required to <a href="http://validator.w3.org/">validate markup</a>.</p>
88
-
<pre><code>
89
-
<!DOCTYPE html>
90
-
<meta charset="UTF-8">
91
-
</code></pre>
92
-
<p><strong>extra:</strong> this the first tag of html file, dont need a closing tag and not case senstitive.</p>
93
-
ref: <a href="http://www.w3.org/QA/Tips/Doctype">don't forget doctype</a>, <a href="http://www.2ality.com/2012/06/dense-arrays.html">Sparse vs Dense Array</a>
94
-
</div> -->
83
+
<divid="doctype">
84
+
<h2>1. float</h2>
85
+
<p><strong>Question:</strong> How float works?</p>
86
+
<p><strong>Answer:</strong> float is to push element on a side of a page with text wrap around it. you can create entire page or litter area by using float. if size of a floated element changes, text around it will reflow to accomodate the changes. You can have float left, right, none or inherit.</p>
87
+
<p> if you set, 'float: left;' for an image, it will move to the left until the margin, padding or border of another block-level element is reached. The normal flow will wrap around on the right side.</p>
88
+
89
+
<p>If interviewer wants to ask one question about css, that would be most likely about float</a>.</p>
90
+
<p><strong>extra:</strong> read the positioning constraints in <ahref="http://www.w3.org/TR/CSS1/#floating-elements">W3.org: floating elements</a>.</p>
0 commit comments