You are on page 1of 3

CSS QUESTIONS

1] what is difference between java and javascript ?


> java is an oop programming language that runs in a virtual machine
> javascript is a oop scripting language that runs only in browsers

2] what is a javascript ?
> javascript is a object orineted language used by developers to make web
page interactive .

3] data types in js ?
> undefined , null , boolean , string , symbol , number ,etc

4] is javascript is a case sensitive ?


> yes it is , coz keywords , variables , function name and other identifiers ,
must be typed in capitalized letters

5] can you assign an anonymous function to a variable and pass it as an


argument to another function ?
> yes

6] what is variables ?
> variables are containers for storing data eg : var , let , const

7] what is the purpose of ‘ THIS ‘ keyword in js ?


> the THIS keyword is a special identifier that is automatically defined in the
scope of every function .
This actual value of this keyword depends on how the function is called.
If the function you're talking about is a regular function, then "this"
refers to the global object.

8] what is callback ?
> a callback is plain js function passed to some method as an
argument or option

9] name some built-in method ?


> length() , cancat() , pop() , push() etc

10] what is a typeof operator ?


> the typeof operator is used to get the datatype of its operand

11] how to create a cookie ?


> document.cookie
12] what Is the difference between “==” “===” ?
>
== checks if values are equal, and it can convert the values to the same type
before checking.

=== checks if values are equal, but it doesn't convert types. Both value and
type must be the same for it to be true.

13] what is difference between null and defined ?


> undefined means a variable is declared but has not yet assigned a value
> null is an assignment value . it can be assigned to a variable as a no value .

14] what is prompt box In js ?


> a prompt box is a box which allows users to enter input by providing a
textbox . the pormpt method displays a dialogbox for input

15] Explain selectors in short and different types of CSS selectors


>

Selectors in CSS are patterns that are used to select and style HTML elements.
Universal Selector (*):

Selects all elements on a page.


Type Selector (Element Selector):

Selects all instances of a specified HTML element.


Example: p selects all <p> elements.

16]
What is the CSS Box Model?
Explain the properties of the Box Model (margin, border, padding, content). ?
>
The CSS Box Model is a fundamental concept that defines the structure and
layout of HTML elements on a web page.
Content:
The innermost part of the box represents the actual content of the HTML
element, such as text, images, or other media.
Padding:
Surrounding the content, there is a padding area. Padding is the space
between the content and the border.
16] Explain the concept of media queries.
>
Media queries in CSS are a powerful tool that allows you to apply styles
to a webpage based on various characteristics of the user's device, such
as screen width, height, resolution, or device

17] What are Flexbox and Grid in CSS ?


Flexbox: Use when dealing with a single dimension, such as aligning
items in a row or a column.
Grid: Use for more complex, two-dimensional layouts where you need
to control both rows and columns.

You might also like