Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

CSS Interview Questions and Answers

Ques 36. Why call the subtended angle a \"pixel\", instead of something else (e.g. \"subangle\")?

Ans. In most cases, a CSS pixel will be equal to a device pixel. But, as you point out, the definition of a CSS pixel will sometimes be different. For example, on a laser printer, one CSS pixel can be equal to 3x3 device pixels to avoid printing illegibly small text and images. I don\'t recall anyone ever proposing another name for it. Subangle? Personally, I think most people would prefer the pragmatic \"px\" to the non-intuitive \"sa\".

Is it helpful? Add Comment View Comments
Ques 37. Why was the decision made to make padding apply outside of the width of a \'box\', rather than inside, which would seem to make more sense?
Ans. It makes sense in some situations, but not in others. For example, when a child element is set to width: 100%, I don\'t think it should cover the padding of its parent. The box-sizing property in CSS3 addresses this issue. Ideally, the issue should have been addressed earlier, though.
Is it helpful? Add Comment View Comments
Ques 38. How to use CSS to separate content and design ?
Ans.
The idea here is that all sites contain two major parts, the content: all your articles, text and photos and the design: rounded corners, colors and effects. Usually those two are made in different parts of a webpage?s lifetime. The design is determined at the beginning and then you start filling it with content and keep the design fixed.

In CSS you just add the nifty <link>-tag I?ve told you about to the head of your HTML document and you have created a link to your design. In the HTML document you put content only, and that link of yours makes sure it looks right. You can also use the exact same link on many of your pages, giving them all of them the same design. You want to add content? Just write a plain HTML document and think about marking things up like ?header? instead of ?big blue header? and use CSS to make all headers look the way you want!
Is it helpful? Add Comment View Comments
Ques 39. Some examples of good and bad coding. What?s wrong with this?
Ans.
<font size="3">Welcome to my page</font>

Comment: The font-tag is design and design shouldn?t be in the HTML document. All design should be in the CSS-file! Instead do this:

In the HTML:
<h1>Welcome to my page</h1>

In the CSS:
h1 { font-size: 2em; }

One more example:

<b>An error occurred</b>

This looks right doesn?t it? But if you look up what <b> stands for you quickly find bold. But bold is certainly design, so it still doesn?t belong in the HTML document. A better choice is <em> that stands for emphasis or simply ?this piece of text is important?. So instead of saying ?this text looks like this? you are saying ?this text is important? and you let the looks be decided by the CSS. Seems like a minor change, but it illustrates how to select your tags. Use this instead:

In the HTML:
<em>An error occured</em>

In the CSS:
em {
font-weight: bold;
color: Red;
}

One last example:

<table>
<tr><td><a href="">first link</a></td></tr>
<tr><td><a href="">second link</a></td></tr>
...
</table>
Is it helpful? Add Comment View Comments
Ques 40. Can CSS be used with other than HTML documents?
Ans. Yes. CSS can be used with any ny structured document format. e.g. XML, however, the method of linking CSS with other document types has not been decided yet.
Is it helpful? Add Comment View Comments
4) Some examples of good and bad coding. What?s wrong with this? 5) Can CSS be used with other than HTML documents? " />

Most helpful rated by users:

©2016 WithoutBook