Monday, September 23, 2019

Html And Css Interview Question


Q #1) What is CSS?
Answer: CSS outline the style of an HTML webpage, it is a language by which we can set the behavior of an HTML webpage. It describes how the HTML content will be shown on screen.
CSS controls the layout of several HTML web pages. CSS is referred to as the Cascading Style Sheet.
Q #2) Name all the modules which are used in the current version of CSS.
Answer: There are several modules in CSS as stated below:
  • Selectors
  • Box Model
  • Backgrounds and Borders
  • Text Effects
  • 2D/3D Transformations
  • Animations
  • Multiple Column Layout
  • User Interface.

Q #3) Distinguish between CSS2 and CSS3.
Answer: There are several differences between CSS2 and CSS3.
  1. CSS3 is divided into two various sections which are called as a module. Whereas in CSS2 everything accedes into a single document with all the information in it.
  2. CSS3 modules are supported almost on every browser and on the other hand modules of CSS and CSS2 are not supported in every browser.
  3. In CSS3 we will find that many graphics related characteristics have been introduced like “Border-radius or box-shadow, flexbox.
  4. In CSS3, a user can precise multiple background images on a webpage by using properties like background-image, background-position, and background-repeat styles.

Q #4) Cite different types of CSS.
Answer: There are three types of CSS as mentioned below.
  • External – These are written in separate files.
  • Internal – These are cited at the top of the web page code document.
  • Inline – These are written right next to the text.

Q #5) Why is the external style sheet useful?
Answer: External style sheet is very useful as we write all the styling codes in a single file and it can be used anywhere by just referencing the link of that external style sheet file.
So if we do any changes in that external file, then the changes can also be observed on the webpage. So we can say that it is very useful and it makes your work easy while working on larger files.
Q #6) How to use CSS selector?
Answer: By using CSS selector, we can choose the content which we want to style so that we can say that it is a bridge between the style sheet and the HTML files.
The syntax for CSS selector is “select” HTML elements created on their id, class, type etc.
Q #7) Explain the concept of Tweening.
Answer: Tweening is the process in which we create intermediate frames between two images to get the appearance of the first image which develops into the second image.
It is mainly used for creating animation.
Q #8) Define CSS image scripts.
Answer: CSS image scripts is a group of images which is placed into one image.
It reduces the load time and request number to the server while projecting multiple images into a single web page.
Q #9) Explain the term Responsive web design.
Answer: It is a method in which we design and develop a web page according to the user activities and conditions which are based on various components like the size of the screen, portability of the web page on different device etc.
Hence it is done by using different flexible layouts and grids.
Q #10) What are CSS counters?
Answer: CSS counters are variables which can be incremented by rules of CSS that inspector track how many times the variable has been used.
Q #11) What is CSS specificity?
Answer: CSS specificity is a score or rank that decides which style declaration has to be used to an element.
(*) this universal selector has low specificity while ID selectors have high specificity.
There are four categories inCSS which authorized the specificity level of the selector.
  • Inline style
  • IDs
  • Classes, Attributes, and pseudo-classes.
  • Elements and pseudo elements.


No comments:

Post a Comment

Which Python course is best for beginners?

Level Up Your Python Prowess: Newbie Ninjas: Don't fret, little grasshoppers! Courses like "Learn Python 3" on Codecade...