1.
What are the two methods of forms transfer?
Correct Answer
B. Get and post
Explanation
The correct answer is "Get and post". These are the two methods used for transferring data between a client and a server in a web form. The "Get" method is used to request data from the server and display it on the client's browser, while the "Post" method is used to send data from the client to the server for processing or storage. Both methods are commonly used in web development to handle form submissions and data retrieval.
2.
What should be the very last thing in an HTML document?
Correct Answer
C. Body
Explanation
The last element in an HTML document should be the closing </body> tag, which ends the body content of the document. After the body tag, the </html> tag follows, closing the HTML document. The heading and title are part of the document's head section, while the doctype declaration is at the very beginning of the HTML document to specify the HTML version being used.
3.
Which of the following is not an HTML tag?
Correct Answer
A. Doctype
Explanation
The Doctype is not an HTML tag. It is used to declare the version of HTML that the webpage is using. It is placed at the very beginning of the HTML document, before the opening tag. The Doctype declaration is important for the browser to correctly interpret and render the webpage.
4.
How many ways can you apply colors in CSS?
Correct Answer
D. 7
Explanation
In CSS (Cascading Style Sheets), there are several ways to apply colors to elements:
1. Color Keywords: CSS supports a set of predefined color keywords like "red," "blue," "green," etc.
2. Hexadecimal Notation: Colors can be specified using a hexadecimal notation such as "#RRGGBB," where RR represents the red component, GG represents the green component, and BB represents the blue component.
3. RGB Function: You can use the `rgb()` function to specify colors using the red, green, and blue values. For example, `rgb(255, 0, 0)` represents pure red.
4. RGBA Function: Similar to `rgb()`, the `rgba()` function allows you to specify colors with an additional alpha (transparency) value. For example, `rgba(255, 0, 0, 0.5)` represents translucent red.
5. HSL Function: The `hsl()` function lets you define colors using hue, saturation, and lightness values. For example, `hsl(0, 100%, 50%)` represents pure red.
6. HSLA Function: Similar to `hsl()`, the `hsla()` function allows you to specify colors with an additional alpha (transparency) value.
7. Color Names: Besides keywords, CSS also supports color names like "aqua," "fuchsia," "yellow," etc.
These various methods provide flexibility in defining colors to meet your design requirements.
5.
How can you clear a floated element?
Correct Answer
A. Clear:both
Explanation
To clear a floated element, you can use the CSS property "clear" with the value "both". This will ensure that no floated elements are allowed on either side of the cleared element.
6.
Which of the following is described as a collection of images put in a single image?
Correct Answer
C. Sprite
Explanation
A sprite is a term used in computer graphics to describe a collection of images that are combined into a single image. This technique is commonly used in video games and animations, where multiple frames of an object or character are grouped together to create the illusion of movement. By combining the images into a single sprite, it allows for more efficient rendering and animation playback. Therefore, a sprite is the correct answer as it best describes a collection of images put in a single image.
7.
A collection of data containing both properties and methods is called...
Correct Answer
C. Object
Explanation
A collection of data containing both properties and methods is called an object. Objects are fundamental in object-oriented programming and are used to represent real-world entities or concepts. They encapsulate data and behavior together, allowing for modular and reusable code. Objects can have attributes (properties) that describe their state and methods that define their behavior. By combining properties and methods, objects provide a way to organize and manipulate data in a structured manner.
8.
In JavaScript, 'this' refers to the object that ____ the object.
Correct Answer
C. Owns
Explanation
In JavaScript, 'this' refers to the object that owns the object. This means that 'this' refers to the current object that is being accessed or manipulated within the code. It is used to refer to the properties and methods of the object itself.
9.
What is the runtime complexity of Fibonacci sequence?
Correct Answer
A. O(2^n)
10.
Which of the following is an instruction to the web browser about what version of the markup language the page is written in?
Correct Answer
D. Doctype
Explanation
The correct answer is "Doctype" because it is an instruction to the web browser about what version of the markup language the page is written in. The Doctype declaration is placed at the very beginning of an HTML document and informs the browser which version of HTML or XHTML is being used. This helps the browser to render the page correctly and ensures that the page is interpreted and displayed as intended by the developer.