Css interview questions and answers pdf free download






















These n number of arguments are changed by the compiler into elements in a temporary array. Q8: What do you mean by operators in C?

Ans: An operator is a symbol that tells the compiler what operations can be performed o an operand. Q9: What are the different types of operators in C? Ans: There are seven operators in C. Ans: A ternary operator works on a conditional expression that returns a Boolean value.

It is a shorthand form of if-else. Q What is the static keyword mean in C? Ans: The static keyword is used to specify a static number, which means that static members are common to all the objects and they do not tie to a specific object.

Q What do you mean by Typecasting in C? Ans: Typecasting is a mechanism to covert one type of value to another value. It is possible only when both the data types are compatible with each other. Q What are the different types of casting in c? Ans: 1. Explicit conversion: Conversion of larger data type to smaller data type.

It might result in loss of data so it is also an unsafe type of casting. Implicit conversion: Conversion of a smaller data type to a larger data type and conversion of derived classes to base class. Q What is an Out keyword in C? Ans: The out is a keyword in C which i s used for passing the arguments to methods as a reference type. It is generally used when a method returns multiple values.

Q Can you use out and ref for overloading as the different signature of method? Ans: No, we cannot do that. Even if both ref and out are treated differently at runtime they treated the same at compile time.

Hence it cannot be overloaded with the same type of arguments. Q What are the named arguments? Q What you man by value type and reference type? Q What is a safe and unsafe code in C? Unsafe code : The code which does not run under the management of CLR is called unsafe code.

Q What is boxing and unboxing in C? Ans: Boxing: Implicit conversion of a value type int, char to a reference type is known as boxing. Unboxing : Explicit conversion of the same reference type which is created back in boxing process back to value type is known as unboxing. Q What is upcasting and Downcasting? Ans: Implicit conversion of derived classes to a base class is called Upcasting and explicit conversion of the base class to a derived class is called Downcasting.

The name can contain characters a-z, A-Z, digits , period, hyphen, escaped characters, and so forth. A class is a style i. This means it can apply to instances of the same element or instances of different elements to which the same style can be attached.

Classes are defined in CSS using a period followed by the class name. It is applied to an HTML element via the class attribute and the class name. Also, you could define a style for all elements with a defined class. This is demonstrated with the following code that selects all P elements with the column class specified.

Contextual selector addresses specific occurrence of an element. It is a string of individual selectors separated by white space search pattern , where only the last element in the pattern is addressed providing it matches the specified context. When more than one selector shares the same declaration, they may be grouped together via a comma-separated list; this allows you to reduce the size of the CSS every bit and byte is important and makes it more readable.

The following snippet applies the same background to the first three heading elements. A child selector is used when you want to match an element that is the child of another specific element. What is the difference between class selector and ID selector?

Class selector can be given to an overall block. This is sometimes termed as block element as well, whereas ID selector identifies a unique name and a style for a specific element. ID selector declares the style for only one particular element which can be differentiated from other element, whereas Class selector is being given for the whole complete block.

What is contextual selector? Contextual selector specifies a specific occurrence of an element. It is combination of many selectors that are separated by white spaces.

In this only the element that matches the specified element will be used not all the elements. What do you understand by parent-child selector? Parent-child selector represents the direct relationship between parent element and child element. Important declarations are those declarations which have high weightage then normal declarations.

These declarations override other declarations of less importance while executing. If suppose there are two statements from two users and both consist of important declaration then the one of the users declaration will override the another users declarations.

Is there any provision to include one or more declaration in a selector? There is a provision to include one or more declaration in a selector by using the semicolon as this shows the separation of the properties. What is the use and syntax of class in CSS? Class is a group of attributes and properties that uniquely identify style that can be attached to any element. It also defines instances for different element to which the same style can be attached.

This can be included with each element where the paragraph tag can be used. There can be given one style to one paragraph and another style to other paragraphs. A class may not have any association with the specific element. But any element with which the specific class is attached will have the same style.

How grouping happens inside a CSS? Grouping in CSS can be done by using the comma , separator in between one or more selectors that share the same style. A list of separator can be separated by using a semicolon as well. What is the purpose of pseudo-elements? Pseudo elements allow the use of the part of element and not the element itself.

They are applied to block level element, which is used for the complete block for which the CSS is being written. This allow the subpart of an element to be styled like paragraphs and headings. How pseudo-classes are different from pseudo-elements? Pseudo classes are used to add style and special effects to some selectors which is being used inside some class. What does cascade and cascading order defines? Cascade is a method in CSS that defines the importance of particular style rules.

Declaration with more importance get executed first then others. What are the different sorting methods used inside the cascading order? Cascading order is a sorting method that allows many different sorting methods like: 1.

Sort by selector's specificity : In this more specific selector will override the selectors that are less specific: For Example: - ID selector is the most specific one.

Sort by order specified : If two selectors are same in the weight and other properties then the specification will be seen for overriding. For Example: - Style attribute used for inline style will override all other styles. How inline and block elements are different from each other? For Example: em, strong, etc. Block elements do have line breaks and they define the width by setting a container. It also allowed setting height. It can contain the elements that occur in inline elements.

How does inheritance work in CSS? Inheritance is a concept that is used in HTML and other languages but it is used in CSS as well to define the hierarchy of the element from top level to bottom level.

In inheritance child will inherit the properties of parent. In this the restriction is being applied that not all the properties can be applied.

Inherited properties can be overrided by the children class if child uses the same name properties. What are the advantages of the external over inline style methods? It can control the styles for multiple documents, whereas inline style mixes the content with the style and make the code messier. How do you override the underlining of hyperlinks? The concept of override the underlining of hyperlinks in CSS is done by using control statements and using external style sheet.

How to center the block-elements with CSS? CSS allows you to style your web-pages and sheets so that you can visualize it in better way. This can be done in two ways: 1. It can be done by defining the properties like margin-left and right to auto and width can be given any value. In CSS if float declaration is being made then it add some width in the form of border and it allow it to float even more. So, the width can be used just by adding the border of say 1 pixel in CSS element.

What is the Difference between id and class? The difference is as follows: 1. Id is an attribute that it uniquely assigns a name to a particular element, whereas class defines an element with certain set of properties which can be used for a complete block.

Id can be used for an element and uniquely identifies it, whereas class is used as block element and applied to many tags where it is used. Id restricts the use of properties to one specific element, whereas class applies the rules and properties to specific block or group of elements. How to restore the default property value using CSS? The only option which can be performed to restore the default property value is to re-declare the property which you want to revert back to. Answer: This is the basic CSS3 interview questions that have been frequently asked in an interview.

Following is the merit and demerit are as follows:. Selector used to select special occurrences of an element is called a contextual selector. Space separates the individual selectors. Only the last element of the pattern is addressed in this kind of selector.

Z index helps in specifying the overlapping element. It is a number which can be positive or negative, the default value being zero. NET skills are […]. We have a set of HR interview questions and answers for experienced to freshers, which will help you to crack the HR interview.



0コメント

  • 1000 / 1000