Css Advanced Interview Questions with Answers
Question: 1. What Is The Difference Between Id And Class?
Answer:
ID identifies and units style to at least one and most effective one prevalence of an detail while class may be attached to any variety of factors.
Question: 2. Can I Include Comments In My Style Sheet?
Answer:
Yes. Comments may be written anywhere wherein whitespace is permitted and are handled as white space themselves. Anything written between /* and */ is treated as a remark (white space).
NOTE: Comments cannot be nested.
XML Interview Questions
Question: three. Is There Anything That Can T Be Replaced By Style Sheets?
Answer:
Quite a bit definitely. Style sheets only specify facts that controls show and rendering facts. Virtual fashion elements that convey the NATURE of the content material can not be replaced through style sheets, and hyperlinking and multimedia item insertion isn’t always a part of fashion sheet capability in any respect (despite the fact that controlling how those items seem IS part of style sheets capability.) The CSS1specification has long gone out of its manner to take in ALL of the HTML functionality utilized in controlling display and format characteristics. For more information at the viable houses in CSS, see the Index DOT Css Property Index.
Rule of Thumb: if an HTML detail or characteristic gives cues as to how its contentsshould be displayed, then some or all of its capability has been absorbed by using stylesheets.
Question: 4. How Can I Make A Page Look The Same In E.G. Ns And Msie ?
Answer:
The easy answer is, you can not, and also you should not waste some time looking to make it precisely the same. Web browsers are allowed, in keeping with definition, to interpret a web page as they prefer, concern to the general regulations set down within the HTML and CSS specifications. As an internet creator you can’t have a prior know-how of the exact situation and/or medium to be able to be used to render your web page, and it is almost usually as an alternative counterproductive to try and manipulate that procedure. There is not any necessity for a nicely-written web page to appearance the equal in different browsers. You may additionally need to strive to make certain that it appears correct in a couple of browser, even though the real display (inside the case of graphical browsers) comes out a bit distinct. “Looking excellent” can be done with the aid of adopting sensible design and recommendations, such as not solving the scale or face of your fonts, now not solving the width of tables, and so forth… Don’t fight the medium; maximum net users handiest use one browser and will in no way realize, or bother to discover, that your page appears unique, or maybe “better”, in every other browser.
XML Tutorial
Question: 5. What Are Pseudo-elements?
Answer:
Pseudo-elements are fictional factors that do not exist in HTML. They address the detail’s sub-part (non-existent in HTML) and now not the element itself. In CSS1 there are two pseudo-elements: ‘first-line pseudo-detail’ and ‘first-letter pseudo-element’. They can be connected to block-stage elements (e.G. Paragraphs or headings) to allow typographical styling of their sub-components.
CSS3 Interview Questions
Question: 6. How Do I Write My Style Sheet So That It Gracefully Cascades With User S Personal Sheet ?
Answer:
You can assist with this with the aid of putting residences in endorsed places. Style rules that observe to the entire file have to be set in the BODY detail — and most effective there. In this way, the user can without difficulty adjust document-huge style settings.
Question: 7. What Is Property?
Answer:
Property is a stylistic parameter (attribute) that may be influenced thru CSS, e.G. FONT or WIDTH. There should continually be a corresponding price or values set to every belongings, e.G. Font: formidable or font: formidable san-serif.
CSS3 Tutorial HTML Interview Questions
Question: 8. What Can Be Done With Style Sheets That Can Not Be Accomplished With Regular Html?
Answer:
Many of the current extensions to HTML have been tentative and fairly crude tries to control file format. Style sheets go numerous steps past, and introduces complicated border, margin and spacing control to most HTML factors. It additionally extends the skills introduced by maximum of the present HTML browser extensions. Background colorings or photographs can now be assigned to ANY HTMLelement instead of just the BODY detail and borders can now be carried out to anyelement rather than just to tables. For more statistics at the possible homes in CSS, see the Index DOT Css Property Index.
Question: nine. Why Is My External Stylesheet Not Working ?
Answer:
There may be numerous distinctive reasons at the back of that, however one very not unusual mistake is to have an outside stylesheet that carries HTML markup in some shape.
An external stylesheet must include most effective CSS policies, and if required, correctly shaped CSS comments; in no way consist of any HTML syntax, such as
Note: The styling rules are written as a HTML remark, that is, among to cover the content in browsers with out CSS aid which could otherwise be displayed.
WordPress Interview Questions
Question: 41. What Is Id Selector?
Answer:
ID selector is an individually recognized (named) selector to which a particular fashion is said. Using the ID attribute the declared style can then be associated with one and handiest one HTML element per record as to differentiate it from all different factors. ID selectors are created by a man or woman # observed by the selector's call. The name can contain characters a-z, A-Z, digits 0-nine, period, hyphen, escaped characters, Unicode characters 161-255, in addition to any Unicode characteras a numeric code, but, they cannot start with a sprint or a digit.
#abc123 coloration: purple; history: black
This and most effective this element may be diagnosed as abc123
