CSS interview Question | top interview question answer
Top Answers to CSS Interview Questions
1. What is External Style Sheet? How would you link to it?
External Style Sheet is the sheet which comprises of style information and can be connected with one or more HTML documents. With the help of External Style Sheet entire website can be formatted and styles just by editing one single file. The file is connected with HTML documents with the help of the LINK element which resides inside the HEAD element.
2. What are the advantages and disadvantages of using External Style Sheets?
The advantages of External Style Sheets are as follows :
With the help of External Style Sheets, the styles of numerous documents can be organized from one single file.
In External Style Sheets, Classes can be made for use on numerous HTML element types in many forms of the site.
In complex contexts, Methods like selector and grouping can be implemented to apply styles.
The disadvantages of External Style Sheets are as follows :
An extra download is essential to import style information for each file.
The execution of the file may be deferred till the external style sheet is loaded.
While implementing style sheets, we need to test Web pages with multiple browsers in order to check compatibility issues.
Click here to learn more about CSS, in this CSS training course.
3. What are the advantages and disadvantages of Embedded Style Sheets?
The advantages of Embedded Style Sheets are as follows :
In Embedded Style Sheets, it is possible to generate classes for use on multiple tag types in the document.
In Embedded Style Sheets, In comparison to In External Style Sheets, no extra download is compulsory to import the information.
The disadvantages of Embedded Style Sheets are as follows :
In Embedded Style Sheets, Controlling the styles for multiple files from one file is not possible.
4. What is CSS selector?
A CSS selector is the portion of a CSS set that chooses the content that requires to style. It is also referred to as a connection between the stylesheet and HTML files. CSS selectors permits you to choice and operate HTML elements. CSS selectors are used to “select” (or find) HTML elements created on their id, class, type etc.
5. What is Tweening?
Also Known as in-betweening, it is the process of creating intermediary frames among two images to provide the appearance that the first image develops efficiently into the second image. It is a key process which is used in all types of animations. Refined animation software permits you to find particular objects in an image and describe how they will be able to move and change throughout the tweening process.
6. What is Responsive Web design?
Responsive Web design is the method that recommends that design and development should reply to the user’s activities and situation based on various components such as size of the screen, the platform and the orientation. The preparation comprises of a mix of flexible layouts and grids, images and an intellectual use of CSS media queries.
7. What is the use of CSS Image sprites?
It is a group of images placed into one image. A web page with multiple images can take a lot of time to load and uses multiple server requests to project the same. With the help of image sprites, we can decrease the number of requests to the server and save time and bandwidth as well.
8. What is the syntax to link external style sheet?
External style sheet comprises of style description that can be linked with the HTML document externally. To keep style separate from the structure, External style sheet is one of the best and organized way.
The syntax for using link External style sheet is as follows :
<HTML>
<HEAD>
<LINK REL=STYLESHEET HREF="Test.css" TYPE="text/css">
</HEAD>
</HTML>
9. How embedded style can be linked with HTML documents?
Embedded style can be implemented within HTML code. It is written using the <Style> tag and used under the <Head> structure.
The syntax of it is as follows :
<HEAD>
<STYLE TYPE=”text/css”>
style {text-indent: 15pt;}
style1{text-color: #060000;}
</STYLE>
</HEAD>
10. Why imported is an easy way to insert the file?
Imported style sheet permits you to import the files which are external or combine one style sheet with another. There can be created many files, different style sheets to have different functions. Import function gives the provision to combine many elements or functionality into one. The syntax to import any file is @import notation, which is used inside the <Style> tag. There is a one rule that implies that the last imported sheet will override the previous ones.
The syntax is shown by coding as :
<Link Rel=Stylesheet Href=”Main.Css” Type=”Text/Css”>
<STYLETYPE=”text=css”>
<!–
@import url(http://www.xyz.css);
…. your code
–>
</STYLE>
Labels
Interview Question
Post A Comment
No comments :
Thanks For visiting Infotech Solutuion Blog