diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..9d8d516 --- /dev/null +++ b/.babelrc @@ -0,0 +1 @@ +{ "presets": ["es2015"] } diff --git a/src/data/file.js b/src/data/file.js index 8514cd8..cb3c3c6 100644 --- a/src/data/file.js +++ b/src/data/file.js @@ -35,17 +35,17 @@ export function deckData() { { q: "What is event bubbling?", a: - 'An event received by an element doesn\'t stop with that one element. That event moves to other elements like the parent, and other ancestors of the element. This is called "event bubbling".' + 'An event received by an element doesn\'t stop with that one element. That event moves to other elements like the parent, and other ancestors of the element. This is called "event bubbling".' }, { q: "What is event delegation?", a: - "Event delegation allows you to avoid adding event listeners to specific nodes; instead, the event listener is added to one parent. That event listener analyzes bubbled events to find a match on child elements." + "Event delegation allows you to avoid adding event listeners to specific nodes; instead, the event listener is added to one parent. That event listener analyzes bubbled events to find a match on child elements." }, { q: "What is the difference between using == and === ?", a: - "Triple equals uses type coercion and compares both value and type. It prevents unintentional truthy cases like false == 0." + "Triple equals uses type coercion and compares both value and type. It prevents unintentional truthy cases like false == 0." }, { q: "What do we call data types copied by VALUE?", @@ -70,54 +70,54 @@ export function deckData() { { q: "Difference between call() and apply()?", a: - "CALL() takes a regular listing of parameters and APPLY() requires the parameters to be in an array." + "CALL() takes a regular listing of parameters and APPLY() requires the parameters to be in an array." }, { q: "What is the purpose of -this- operator in JavaScript?", a: - "This, always refers to properties or methods accessible to a developer on an object." + "This, always refers to properties or methods accessible to a developer on an object." }, { q: "What are the valid scopes of a variable in JavaScript?", a: - "The region of your program in which it is defined. There are three: \n -Global Variables − A global variable has global scope which means it is visible everywhere in your JavaScript code.\n-Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.\nBlock Scoped variables- variables defined using const/let keywords are scoped to the block in which they are defined." + "The region of your program in which it is defined. There are three: \n -Global Variables − A global variable has global scope which means it is visible everywhere in your JavaScript code.\n-Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.\nBlock Scoped variables- variables defined using const/let keywords are scoped to the block in which they are defined." }, { q: - "Which type of variable among global and local, takes precedence over other if names are same?", + "Which type of variable among global and local, takes precedence over other if names are same?", a: - "A local variable takes precedence over a global variable with the same name." + "A local variable takes precedence over a global variable with the same name." }, { q: "What is callback?", a: - "A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered." + "A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered." }, { q: "Explain Lexical Scoping", a: - 'Lexical Scoping describes how a parser resolves variable names when functions are nested. \nThe word "lexical" refers to the fact that lexical scoping uses the location where a variable is declared within the source code to determine where that variable is available. \nE.G. Nested functions have access to variables declared in their outer scope.' + 'Lexical Scoping describes how a parser resolves variable names when functions are nested. \nThe word "lexical" refers to the fact that lexical scoping uses the location where a variable is declared within the source code to determine where that variable is available. \nE.G. Nested functions have access to variables declared in their outer scope.' }, { q: "What is closure?", a: - "Closures are created whenever a variable that is defined outside the current scope is accessed from within some inner scope." + "Closures are created whenever a variable that is defined outside the current scope is accessed from within some inner scope." }, { q: "Give an example of closure?", a: - "Following example shows how the variable counter is visible within the create, increment, and print functions, but not outside of them −\nfunction create() {\nvar counter = 0;\nreturn {\nincrement: function() {\ncounter++;\n},\n\nprint: function() {\nconsole.log(counter);\n}\n}\n}\nvar c = create();\nc.increment();\nc.print(); // ==> 1\n" + "Following example shows how the variable counter is visible within the create, increment, and print functions, but not outside of them −\nfunction create() {\nvar counter = 0;\nreturn {\nincrement: function() {\ncounter++;\n},\n\nprint: function() {\nconsole.log(counter);\n}\n}\n}\nvar c = create();\nc.increment();\nc.print(); // ==> 1\n" }, { q: "Adding a number and a string results in?", a: - "Coercion: converting a value from one type to another. This happens because JS is dynamically typed." + "Coercion: converting a value from one type to another. This happens because JS is dynamically typed." }, { q: - 'What is the difference between "undefined" and "null" in JavaScript?', + 'What is the difference between "undefined" and "null" in JavaScript?', a: - '"undefined" means variable is declared but not yet assigned a value and null is a value that can be assigned of type "object".' + '"undefined" means variable is declared but not yet assigned a value and null is a value that can be assigned of type "object".' }, { q: "What boolean operators does JavaScript support?", @@ -129,69 +129,69 @@ export function deckData() { }, { q: - 'What is the difference between "undefined" and "not defined" in a JavaScript error?', + 'What is the difference between "undefined" and "not defined" in a JavaScript error?', a: - '"Undefined" means a variable is declared but not assingned any values but "Not defined" means the variable is not declared yet.' + '"Undefined" means a variable is declared but not assingned any values but "Not defined" means the variable is not declared yet.' }, { q: "What is the difference between == and === in JavaScript?", a: - "The == operator checks only equality of the values while === checks equality of values with its datatype i.e. values should be of same type." + "The == operator checks only equality of the values while === checks equality of values with its datatype i.e. values should be of same type." }, { q: - "What are different programming paradigm important for JavaScript developers?", + "What are different programming paradigm important for JavaScript developers?", a: - "Procedural Programming with Object Oriented Programming and Fuctional Programming." + "Procedural Programming with Object Oriented Programming and Fuctional Programming." }, { q: "How can you get type of arguments passed to a function?", a: - 'Using "typeof" operator. Ex- function abc(x){console.log(typeof x, arguments.length);}//Here when function "abc" is called it returns the type and length of passed value.' + 'Using "typeof" operator. Ex- function abc(x){console.log(typeof x, arguments.length);}//Here when function "abc" is called it returns the type and length of passed value.' }, { q: - "What is the disadvantage of creating true private methods in JavaScript?", + "What is the disadvantage of creating true private methods in JavaScript?", a: - "They are very memory inefficient as a new copy of method is created every instance." + "They are very memory inefficient as a new copy of method is created every instance." }, { q: "How to use external JavaScript file?", a: - '  "Here It is assumed that myfile.js is the external js file". ' + '  "Here It is assumed that myfile.js is the external js file". ' }, { q: - 'What is the difference between "undefined" and "null" in JavaScript?', + 'What is the difference between "undefined" and "null" in JavaScript?', a: - '"undefined" means variable is declared but not yet assigned a value and null is a value that can be assigned of type "object".' + '"undefined" means variable is declared but not yet assigned a value and null is a value that can be assigned of type "object".' }, { q: "Explain HOISTING", a: - "Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution." + "Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution." }, { q: "What's the difference between .call and .apply?", a: - "The difference is that apply lets you invoke the function with arguments as an array; call requires the parameters be listed explicitly" + "The difference is that apply lets you invoke the function with arguments as an array; call requires the parameters be listed explicitly" }, { q: "What is function composition?", a: - "Function composition is the process of combining two or more functions to produce a new function. Composing functions together is like snapping together a series of pipes for our data to flow through." - }, - { - q: "What is DOM in javascript?", - a: - "A hierarchial structure to access or modify a web page is called Document Object Model or DOM." - }, - { - q: "How do you reference a form field in javascript?", - a: - 'To refer a form field from javascript, you can use : document.getElementById("myform").txtName or document.getElementById("myform") methods' - } + "Function composition is the process of combining two or more functions to produce a new function. Composing functions together is like snapping together a series of pipes for our data to flow through." + }, + { + q: "What is DOM in javascript?", + a: + "A hierarchial structure to access or modify a web page is called Document Object Model or DOM." + }, + { + q: "How do you reference a form field in javascript?", + a: + 'To refer a form field from javascript, you can use : document.getElementById("myform").txtName or document.getElementById("myform") methods' + } ] }, @@ -203,9 +203,9 @@ export function deckData() { cards: [ { q: - "Major difference between function expression vs function declaration?", + "Major difference between function expression vs function declaration?", a: - "Function expression:\n- named or unnamed ex. var myFunc = function( ) { }\n Function declaration: \n- named ex. function myFunc( ) { } " + "Function expression:\n- named or unnamed ex. var myFunc = function( ) { }\n Function declaration: \n- named ex. function myFunc( ) { } " }, { q: "Functions are treated as what type in JavaScript?", @@ -213,22 +213,22 @@ export function deckData() { }, { q: - "What do we call a function that gets executed at the end of an operation, once all of the other operations have been completed", + "What do we call a function that gets executed at the end of an operation, once all of the other operations have been completed", a: "Callback function" }, { q: - "When passing named functions as callback, why might you not normally include parentheses - ex. .addEventListener('click', myFunction)", + "When passing named functions as callback, why might you not normally include parentheses - ex. .addEventListener('click', myFunction)", a: "myFunction() would return result of myFunction" }, { q: - "What is the major difference between functions vs variables in regards to hoisting?", + "What is the major difference between functions vs variables in regards to hoisting?", a: "Some functions are usable before they are declared" }, { q: - "What is a function defined inside an expression, ex. var x = function(){ }?", + "What is a function defined inside an expression, ex. var x = function(){ }?", a: "Function expression" }, { @@ -241,7 +241,7 @@ export function deckData() { }, { q: - "1) Identifying what functions caused errors, 2) more understandable and accessible, 3) easier to reuse, all are major advantages of what type of functions?", + "1) Identifying what functions caused errors, 2) more understandable and accessible, 3) easier to reuse, all are major advantages of what type of functions?", a: "Named functions" }, { @@ -254,7 +254,7 @@ export function deckData() { }, { q: - "Functions that take one or more functions as an input, or functions that output another function, are called?", + "Functions that take one or more functions as an input, or functions that output another function, are called?", a: "Higher order functions " }, { @@ -279,7 +279,7 @@ export function deckData() { }, { q: - "What type of function would this be? \n(function() {\nconsole.log('lumos');\n})();", + "What type of function would this be? \n(function() {\nconsole.log('lumos');\n})();", a: "IIFE (Immediately Invokable Function Expression)" }, { @@ -288,7 +288,7 @@ export function deckData() { }, { q: - "A _____ function is a one that happens to be called with the 'new' operator.", + "A _____ function is a one that happens to be called with the 'new' operator.", a: "Constructor - ex. var g = new Graph()" } ] @@ -307,22 +307,22 @@ export function deckData() { }, { q: - "Returns the index within the calling String object of the last occurrence of the specified value starting?", + "Returns the index within the calling String object of the last occurrence of the specified value starting?", a: "lastIndexOf()" }, { q: - "Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?", + "Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?", a: "localeCompare()" }, { q: - "Returns a new string with some or all matches of a pattern replaced by a replacement?", + "Returns a new string with some or all matches of a pattern replaced by a replacement?", a: "replace()" }, { q: - "Executes a search for a match between a regular expression and this String object?", + "Executes a search for a match between a regular expression and this String object?", a: "search()" }, { @@ -331,22 +331,22 @@ export function deckData() { }, { q: - "Splits a String object into an array of strings by separating the string into substrings, using a specified separator string to determine where to make each split?", + "Splits a String object into an array of strings by separating the string into substrings, using a specified separator string to determine where to make each split?", a: "split()" }, { q: - "Returns a subset of a string between one index and another, or through the end of the string?", + "Returns a subset of a string between one index and another, or through the end of the string?", a: "substring()" }, { q: - "Returns the calling string value converted to lower case, according to any locale-specific case mappings?", + "Returns the calling string value converted to lower case, according to any locale-specific case mappings?", a: "toLocaleLowerCase()" }, { q: - "Returns the calling string value converted to upper case, according to any locale-specific case mappings?", + "Returns the calling string value converted to upper case, according to any locale-specific case mappings?", a: "toLocaleUpperCase()" }, { @@ -367,7 +367,7 @@ export function deckData() { }, { q: - "Returns the index within the calling String object of the first occurrence of the specified value?", + "Returns the index within the calling String object of the first occurrence of the specified value?", a: "indexOf()" }, { @@ -384,7 +384,7 @@ export function deckData() { }, { q: - "Adds one or more elements to the end of an array and returns the new length of the array?", + "Adds one or more elements to the end of an array and returns the new length of the array?", a: "push()" }, { @@ -401,12 +401,12 @@ export function deckData() { }, { q: - "Changes the contents of an array by removing existingelements or adding elements?", + "Changes the contents of an array by removing existingelements or adding elements?", a: "splice()" }, { q: - "Returns the characters in a string beginning at the specified location?", + "Returns the characters in a string beginning at the specified location?", a: "substr()" }, { @@ -431,12 +431,12 @@ export function deckData() { }, { q: - "Display an alert message along with asking the user to enter a value?", + "Display an alert message along with asking the user to enter a value?", a: "window.prompt()" }, { q: - "Show a confirmation message and ask the user to confirm or cancel?", + "Show a confirmation message and ask the user to confirm or cancel?", a: "window.confirm()" }, { @@ -457,7 +457,7 @@ export function deckData() { }, { q: - "Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?", + "Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?", a: "localeCompare()" }, { @@ -466,32 +466,32 @@ export function deckData() { }, { q: - "Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?", + "Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring?", a: "replace()" }, { q: - "Returns true if every element in this array satisfies the provided testing function?", + "Returns true if every element in this array satisfies the provided testing function?", a: "every()" }, { q: - "Returns true if at least one element in this array satisfies the provided testing function?", + "Returns true if at least one element in this array satisfies the provided testing function?", a: "some()" }, { q: - "Creates a new array with all of the elements of this array for which the provided function returns true?", + "Creates a new array with all of the elements of this array for which the provided function returns true?", a: "filter()" }, { q: - "Removes the first element from an array and returns that element?", + "Removes the first element from an array and returns that element?", a: "shift()" }, { q: - "Adds one or more elements to the front of an array and returns the new length of the array?", + "Adds one or more elements to the front of an array and returns the new length of the array?", a: "unshift()" }, { @@ -500,12 +500,12 @@ export function deckData() { }, { q: - "Returns the day of the month for the specified date according to local time?", + "Returns the day of the month for the specified date according to local time?", a: "getDate()" }, { q: - "Returns the day of the week for the specified date according to local time?", + "Returns the day of the week for the specified date according to local time?", a: "getDay()" }, { @@ -530,7 +530,7 @@ export function deckData() { }, { q: - "Defines how many total digits (including digits to the left and right of the decimal) to display of a number?", + "Defines how many total digits (including digits to the left and right of the decimal) to display of a number?", a: "toPrecision()" }, { @@ -543,9 +543,9 @@ export function deckData() { }, { q: - "Which string method removed whitespace from either end of a string?", + "Which string method removed whitespace from either end of a string?", a: - "The trim() method returns the string stripped of whitespace from both ends. trim() does not affect the value of the string itself." + "The trim() method returns the string stripped of whitespace from both ends. trim() does not affect the value of the string itself." } ] }, @@ -658,17 +658,17 @@ export function deckData() { { q: "Name a few design patterns for JS", a: - "Module, Singleton, \nPrototype, Observer, \nConstructor, Revealing Module, \nMediator, Command, \nDecorator, Flyweight, \nFacade, Factory, Mixin" + "Module, Singleton, \nPrototype, Observer, \nConstructor, Revealing Module, \nMediator, Command, \nDecorator, Flyweight, \nFacade, Factory, Mixin" }, { q: "What is a Design Pattern?", a: - "A design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software" + "A design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software" }, { q: "Describe The Decorator Pattern", a: - "The decorator is defined as a design pattern that allows behaviour to be added to an existing object dynamically" + "The decorator is defined as a design pattern that allows behaviour to be added to an existing object dynamically" }, { q: "What does MVC stands for?", @@ -676,23 +676,23 @@ export function deckData() { }, { q: - "Which pattern is it? Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.", + "Which pattern is it? Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.", a: "Observer pattern" }, { q: - "What does “favor object composition over class inheritance” mean?", + "What does “favor object composition over class inheritance” mean?", a: - "That objects should only include the required functionality from different classes instead of inheriting the whole base class, which will have many unused methods" + "That objects should only include the required functionality from different classes instead of inheriting the whole base class, which will have many unused methods" }, { q: "Define Composite pattern", a: - "The composite pattern says that a group of objects can be treated in the same manner as an individual object of the group" + "The composite pattern says that a group of objects can be treated in the same manner as an individual object of the group" }, { q: - "Which design pattern restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system", + "Which design pattern restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system", a: "Sigleton" } ] @@ -706,17 +706,17 @@ export function deckData() { { q: "What is CSS?", a: - "Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable." + "Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable." }, { q: "What are the components of a CSS Style?", a: - "Selector − an HTML tag like

or \nProperty − attribute of HTML tag, ex. color, border \nValue − assigned to properties, ex. color property can have red or #F1F1F1" + "Selector − an HTML tag like

or

\nProperty − attribute of HTML tag, ex. color, border \nValue − assigned to properties, ex. color property can have red or #F1F1F1" }, { q: "What is type selector?", a: - "matches the name of an element type. To give a color to all level 1 headings −\nh1 {\ncolor:\n#36CFFF;\n}" + "matches the name of an element type. To give a color to all level 1 headings −\nh1 {\ncolor:\n#36CFFF;\n}" }, { q: "What is universal selector?", @@ -725,42 +725,42 @@ export function deckData() { { q: "What is Descendant Selector?", a: - "apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to element only when it lies inside
    tag. \nul em {\ncolor: #000000; \n}" + "apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to element only when it lies inside
      tag. \nul em {\ncolor: #000000; \n}" }, { q: 'What is "Z-index"', a: - "Z-index specifies the z-order of a positioned element and its descendants. If one element had a z-index of 0 and another had a z-index of 1, the element with a z-index of 1 would be above/overlapping the other element." + "Z-index specifies the z-order of a positioned element and its descendants. If one element had a z-index of 0 and another had a z-index of 1, the element with a z-index of 1 would be above/overlapping the other element." }, { q: "What is the Box Model", a: - "The Box Model is the term used for the CSS standard model used by a browser's rendering engine when laying out a document: each element is represented as a rectangular box." + "The Box Model is the term used for the CSS standard model used by a browser's rendering engine when laying out a document: each element is represented as a rectangular box." }, { q: "What are preprocessor and postprocessors?", a: - "Preprocessors and postprocessors both modify and extend the behavior of CSS. Preprocessors are written in a different language (SASS, SCSS, LESS) that is then compiled to CSS. Post Processors (PostCSS) compile CSS and add additional properties to it - such as vendor prefixes." + "Preprocessors and postprocessors both modify and extend the behavior of CSS. Preprocessors are written in a different language (SASS, SCSS, LESS) that is then compiled to CSS. Post Processors (PostCSS) compile CSS and add additional properties to it - such as vendor prefixes." }, { q: "What are vendor (or browser) prefixes?", a: - "These are a way for browsers to add support for new features before they are supported. They are particularly important when considering cross browser compatability. Some more common examples are: -webkit, -moz, and -ms" + "These are a way for browsers to add support for new features before they are supported. They are particularly important when considering cross browser compatability. Some more common examples are: -webkit, -moz, and -ms" }, { q: "What is the purpose of a pseudo-class", a: - "Pseudo-classes specify a special state for selected elements\nExample -\n div:hover { \n/** set styles for when mouse is over div */ \n}" + "Pseudo-classes specify a special state for selected elements\nExample -\n div:hover { \n/** set styles for when mouse is over div */ \n}" }, { q: "What is the difference between a class and an ID selector?", a: - "An id selector is used to style one specific element, but a class selector can be used to style multiple elements." + "An id selector is used to style one specific element, but a class selector can be used to style multiple elements." }, { q: "What are pseudo elements?", a: - "Pseudo-elements are a keyword added to selectors to style specific parts of the selected elements\nExample -\n p::first-line { \n /** Style the first line of the element red */ color: #F00; \n}" + "Pseudo-elements are a keyword added to selectors to style specific parts of the selected elements\nExample -\n p::first-line { \n /** Style the first line of the element red */ color: #F00; \n}" }, { q: "How can elements be fixed on the screen?", @@ -768,19 +768,19 @@ export function deckData() { }, { q: - "What is the difference between an element whose position is fixed vs absolute?", + "What is the difference between an element whose position is fixed vs absolute?", a: - "A fixed position element has the position relative to the viewport. A absolutely positioned element has the position set relative to it's nearest positioned ancestor." + "A fixed position element has the position relative to the viewport. A absolutely positioned element has the position set relative to it's nearest positioned ancestor." }, { q: - "How are text or inline elements centered inside their parent element?", + "How are text or inline elements centered inside their parent element?", a: "Using the property text-align: center" }, { q: "What is the difference between margin and padding?", a: - "Padding is the space between border and element contents, margin is the space between border and neighboring elements." + "Padding is the space between border and element contents, margin is the space between border and neighboring elements." }, { q: "How can CSS styles be applied inline in HTML?", @@ -797,7 +797,7 @@ export function deckData() { { q: "How can a font family be set throughout the page?", a: - "By applying the font-family property on the body tag -\nbody { \nfont-family: 'Comic Sans'; \n}" + "By applying the font-family property on the body tag -\nbody { \nfont-family: 'Comic Sans'; \n}" }, { q: "How can the style of a list be changed?", @@ -806,7 +806,7 @@ export function deckData() { { q: "How are CSS stylesheets added to HTML pages?", a: - 'Using the ' + 'Using the ' }, { q: "What tag is used to internally add CSS styles to a HTML page?", @@ -823,132 +823,132 @@ export function deckData() { { q: "What is the difference between width: 100% and width: 100vw?", a: - "The former sets the element width as that of the parent content area, whereas the latter sets the elements width to the width of the entire viewport" + "The former sets the element width as that of the parent content area, whereas the latter sets the elements width to the width of the entire viewport" }, { q: - "When setting a z-index to an element what other css atribute must also be set?", + "When setting a z-index to an element what other css atribute must also be set?", a: "An element must have a display setting to utilize z-indexing" }, { q: - "When using flex-box to create a responsive layout what atribute will allow a containers elemets to not break outside a set media query", + "When using flex-box to create a responsive layout what atribute will allow a containers elemets to not break outside a set media query", a: - "Using flew-wrap will allow a given set of elements to break and re order when there parent container becomes too small" + "Using flew-wrap will allow a given set of elements to break and re order when there parent container becomes too small" }, { q: - "When laying out a number of variable sized containers, each with text inside, how can flex-box be used to align this text", + "When laying out a number of variable sized containers, each with text inside, how can flex-box be used to align this text", a: - "Using align-items with the baseline attribute will position the elemnts inside there parent containers." + "Using align-items with the baseline attribute will position the elemnts inside there parent containers." }, { q: "Can flex-box commands be chained or combined", a: - "Yes flex-grow | flex-shrink | flex-basis can be written as flex: 5 5 10%;" + "Yes flex-grow | flex-shrink | flex-basis can be written as flex: 5 5 10%;" }, { q: "Differentiate Class selector from ID selector?", a: - "While an overall block is given to class selector, ID selector prefers only a single element differing from other elements. In other words, ID are uniques while classes are not. Its possible that an element has both class and ID." + "While an overall block is given to class selector, ID selector prefers only a single element differing from other elements. In other words, ID are uniques while classes are not. Its possible that an element has both class and ID." }, { q: "What is Pseudo-elements?", a: - "Pseudo-elements are used to add special effects to some selectors. CSS in used to apply styles in HTML mark-up. In some cases when extra mark-up or styling is not possible for the document, then there is a feature available in CSS known as pseudo-elements. It will allow extra mark-up to the document without disturbing the actual document." + "Pseudo-elements are used to add special effects to some selectors. CSS in used to apply styles in HTML mark-up. In some cases when extra mark-up or styling is not possible for the document, then there is a feature available in CSS known as pseudo-elements. It will allow extra mark-up to the document without disturbing the actual document." }, { q: - "What happens if 100% width is used along with floats all across the page?", + "What happens if 100% width is used along with floats all across the page?", a: - "While making the float declaration, 1 pixel is added every time it is used in the form of the border, and even more float is allowed thereafter." + "While making the float declaration, 1 pixel is added every time it is used in the form of the border, and even more float is allowed thereafter." }, { q: "Can default property value be restored through CSS? If yes, how?", a: - "n CSS, you cannot revert back to old values due to lack of default values. The property can be re- declared to get the default property." + "n CSS, you cannot revert back to old values due to lack of default values. The property can be re- declared to get the default property." }, { q: "What is contextual selector?", a: - "Selector used to select special occurrences of an element is called contextual selector. A space separates the individual selectors. Only the last element of the pattern is addressed in this kind of selector. For e.g.: TD P TEXT {color: blue}" + "Selector used to select special occurrences of an element is called contextual selector. A space separates the individual selectors. Only the last element of the pattern is addressed in this kind of selector. For e.g.: TD P TEXT {color: blue}" }, { q: "Define Image sprites with context to CSS ?", a: - "When a set of images is collaborated into one image, it is known as ‘Image Sprites’. As the loading every image on a webpage consumes time, using image sprites lessens the time taken and gives information quickly." + "When a set of images is collaborated into one image, it is known as ‘Image Sprites’. As the loading every image on a webpage consumes time, using image sprites lessens the time taken and gives information quickly." }, { q: "How does Z index function?", a: - "Overlapping may occur while using CSS for positioning HTML elements. Z index helps in specifying the overlapping element. It is a number which can be positive or negative, the default value being zero." + "Overlapping may occur while using CSS for positioning HTML elements. Z index helps in specifying the overlapping element. It is a number which can be positive or negative, the default value being zero." }, { q: "Define float property of CSS?", a: - "By float property, the image can be moved to the right or the left along with the text to be wrapped around it. Elements before this property is applied do not change their properties." + "By float property, the image can be moved to the right or the left along with the text to be wrapped around it. Elements before this property is applied do not change their properties." }, { q: "What is graceful degradation?", a: - "In case the component fails, it will continue to work properly in the presence of a graceful degradation. The latest browser application is used when a webpage is designed. As it is not available to everyone, there is a basic functionality, which enables its use to a wider audience. In case the image is unavailable for viewing, text is shown with the alt tag." + "In case the component fails, it will continue to work properly in the presence of a graceful degradation. The latest browser application is used when a webpage is designed. As it is not available to everyone, there is a basic functionality, which enables its use to a wider audience. In case the image is unavailable for viewing, text is shown with the alt tag." }, { q: "What is progressive enhancement?", a: - "It’s an alternative to graceful degradation, which concentrates on the matter of the web. The functionality is same, but it provides an extra edge to users having the latest bandwidth. It has been into prominent use recently with mobile internet connections expanding their base." + "It’s an alternative to graceful degradation, which concentrates on the matter of the web. The functionality is same, but it provides an extra edge to users having the latest bandwidth. It has been into prominent use recently with mobile internet connections expanding their base." }, { q: "What is Alternate Style Sheet?", a: - "Alternate Style Sheets allows the user to select the style in which the page is displayed using the view>page style menu. Through Alternate Style Sheet, user can see a multiple version of the page on their needs and preferences." + "Alternate Style Sheets allows the user to select the style in which the page is displayed using the view>page style menu. Through Alternate Style Sheet, user can see a multiple version of the page on their needs and preferences." }, { q: "Differentiate Style Sheet concept from HTML?", a: - "While HTML provides easy structure method, it lacks styling, unlike Style sheets. Moreover, style sheets have better browser capabilities and formatting options." + "While HTML provides easy structure method, it lacks styling, unlike Style sheets. Moreover, style sheets have better browser capabilities and formatting options." }, { q: "Comment on the Case-sensitivity of CSS ?", a: - "Although, there are no case-sensitivity of CSS, nevertheless font families, URL’s of images, etc is. Only when XML declarations along with XHTML DOCTYPE are being used on the page, CSS is case -sensitive." + "Although, there are no case-sensitivity of CSS, nevertheless font families, URL’s of images, etc is. Only when XML declarations along with XHTML DOCTYPE are being used on the page, CSS is case -sensitive." }, { q: "Define Declaration block?", a: - "A catalog of directions within braces consisting of property, colon and value is called declaration block. e.g.: [property 1: value 3]" + "A catalog of directions within braces consisting of property, colon and value is called declaration block. e.g.: [property 1: value 3]" }, { q: "Why is it easy to insert a file by importing it?", a: - "mporting enables combining external sheets to be inserted in many sheets. Different files and sheets can be used to have different functions. Syntax: @import notation, used with