1.
Does setting margin-top and margin-bottom have an affect on an inline element?
Correct Answer
A. NO
Explanation
Setting margin-top and margin-bottom does not have an effect on an inline element. Inline elements are formatted in a way that they do not respect top and bottom margins. Instead, they only respect left and right margins. This is because inline elements are intended to flow within a line of text and not disrupt the vertical layout. Therefore, any margin values applied to an inline element for top and bottom will not be applied.
2.
Does setting padding-top and padding-bottom on an inline element add to its dimensions?
Correct Answer
B. False
Explanation
Setting padding-top and padding-bottom on an inline element does not add to its dimensions. Padding only affects the spacing inside an element, not its overall size. In the case of an inline element, the padding will create space around the content within the element, but it will not change the height or width of the element itself. Therefore, the statement is false.
3.
If you have a <p> element with font-size: 10rem, will the text be responsive when the user resizes / drags the browser window?
Correct Answer
B. False
Explanation
If the font-size is set to 10rem, it means that the font size is relative to the root element's font size. Therefore, when the user resizes or drags the browser window, the font size will not be responsive as it is not set to a specific unit like pixels or percentages that would automatically adjust with the window size changes.
4.
HTML:
- <ul class="shopping-list" id="awesome">
- <li><span>Milk</span></li>
- <li class="favorite" id="must-buy"><span class="highlight">Sausage</span></li>
- </ul>
CSS:
- ul {
- color: red;
- }
- li {
- color: blue;
- }
What is the color of the text Sausage ?
Correct Answer
B. Blue
Explanation
The text "Sausage" is blue because the CSS rule `li {color: blue;}` applies a blue color to all `li` elements, including the one containing the text "Sausage". The `ul` element also has a CSS rule `ul {color: red;}`, but this rule does not affect the color of the text within the `li` elements. Therefore, the correct answer is Blue.
5.
HTML:
- <ul class="shopping-list" id="awesome">
- <li><span>Milk</span></li>
- <li class="favorite" id="must-buy"><span class="highlight">Sausage</span></li>
- </ul>
CSS:
- ul li {
- color: blue;
- }
- #must-buy {
- color: black;
- }
What is the color of the text Sausage ?
Correct Answer
A. Black
Explanation
The text "Sausage" is black because in the CSS code, there is a specific rule targeting the element with the id "must-buy" and setting its color to black.
6.
HTML:
<p id="example">Hello</p>
CSS:
#example {
margin-bottom: -5px;
}
What will happen to the position of #example?
Correct Answer
B. All elements succeeding #example with move 5px upwards
Explanation
The CSS rule "#example { margin-bottom: -5px; }" will move the position of the element with the id "example" 5px upwards. This means that all elements succeeding the element with the id "example" will also move 5px upwards.
7.
A TARGET value that is used when a webpage is locked in a frame, is
Correct Answer
B. _top
Explanation
When a webpage is locked in a frame, the "_top" target value is used to break out of the frame and load the linked webpage in the full body of the browser window. This means that the linked webpage will replace the current frameset, allowing the user to navigate away from the framed webpage and access the linked webpage independently.
8.
Using a <style> element in head section is known as
Correct Answer
C. Internal
Explanation
Using a element in the head section of an HTML document is known as internal styling. Internal styling allows the web designer to define CSS rules within the HTML document itself, making it easier to maintain and update the styling for multiple web pages. This method is different from inline styling, where CSS rules are applied directly to individual HTML elements using the style attribute. External styling, on the other hand, involves linking an external CSS file to the HTML document.
9.
In HTML elements, CSS can be added in different
Correct Answer
B. 3 ways
Explanation
CSS can be added to HTML elements in three different ways. The first way is by using inline styles, where CSS is directly added to the HTML element using the "style" attribute. The second way is by using internal stylesheets, where CSS is written within the "style" tags in the head section of the HTML document. The third way is by using external stylesheets, where CSS is written in a separate file with a .css extension and linked to the HTML document using the "link" tag.
10.
Browsers displays <em> tag as
Correct Answer
A. <i>
Explanation
The browser displays the tag as . The tag is used to emphasize text, and the tag is used to italicize text. Both tags visually appear the same way in most browsers, so they can be used interchangeably.
11.
Alpha in RGB extension named RGBA, defines
Correct Answer
D. Opacity
Explanation
The alpha value in the RGB extension named RGBA defines the opacity of a color. It determines how transparent or opaque the color is. By adjusting the alpha value, we can control the visibility of an object or layer in an image or graphic. A higher alpha value makes the color more opaque, while a lower alpha value makes it more transparent.
12.
To access an external sheet link is added over section
Correct Answer
A. <head>
Explanation
The given answer is "". In HTML, the element is used to define the head section of a document, which contains meta information about the document such as title, stylesheets, scripts, etc. It is typically placed before the element. In this case, the question mentions that a link is added over a section, and it is common practice to include external stylesheets or scripts in the section using the tag. Therefore, adding a link over a section would require placing it within the element.
13.
If form data contains sensitive or personal information, method to use is
Correct Answer
A. Post
Explanation
The correct answer is "Post" because the POST method is used to send data to the server in a secure and confidential manner. When sensitive or personal information is involved, it is important to use the POST method as it sends the data in the body of the HTTP request, making it less visible and accessible compared to the GET method which sends the data in the URL.
14.
HTML links are defined with <a> tag and address is specified by attribute
Correct Answer
B. Href
Explanation
HTML links are defined with the tag and the address of the link is specified by the "href" attribute. The "href" attribute stands for "hypertext reference" and is used to specify the URL or file path of the destination page when a user clicks on the link. Therefore, "href" is the correct attribute to define the address of an HTML link.
15.
For displaying a webpage within a webpage, HTML uses
Correct Answer
D. IFrames
Explanation
HTML uses iFrames to display a webpage within a webpage. iFrames allow developers to embed another HTML document within the current document. This is useful for displaying content from another website or integrating external content into a webpage. iFrames provide a way to create a separate window or frame within a webpage, allowing for more flexibility and control over the displayed content.
16.
A block level element of HTML always starts on a
Correct Answer
D. New Line
Explanation
A block level element of HTML always starts on a new line. This means that when a block level element is encountered in the HTML code, it will be displayed on a new line, separate from any content that may appear before or after it. This is in contrast to inline elements, which do not start on a new line and can appear within a line of text.
17.
An external CSS usually defines style for?
Correct Answer
D. Multiple HTML pages
Explanation
An external CSS is typically used to define styles for multiple HTML pages. By linking an external CSS file to multiple HTML pages, the same styles can be applied consistently across all of them. This allows for easier maintenance and updates, as changes made to the external CSS file will automatically be reflected in all the linked HTML pages.
18.
Syntax of style attribute of HTML is
Correct Answer
B. <tagname style="property:value;">
Explanation
The correct answer is "". This is the correct syntax for the style attribute in HTML. The style attribute is used to apply inline CSS styles to a specific HTML element. It is written as "style=" followed by the CSS property and its corresponding value, separated by a colon. Multiple properties and values can be added by separating them with a semicolon.
19.
Element to use for making responsive webpages, is called
Correct Answer
B. <meta>
Explanation
The correct answer is . The element is used in HTML to provide metadata about the webpage. It can be used to specify various attributes, including the viewport attribute, which is commonly used for making webpages responsive. The viewport attribute allows developers to control the width and scaling of the webpage on different devices, ensuring that the content is displayed correctly and optimally for different screen sizes.
20.
Div element defines section at a
Correct Answer
C. Block level
Explanation
The element is used to define a section of content on a webpage. It is a block-level element, meaning that it takes up the entire width of its parent container and creates a new line before and after the element. This allows for easy organization and styling of content within the element.
21.
Which of the following is/are true about Bootstrap?
Correct Answer
D. All of the above
Explanation
Bootstrap is a free front-end framework and an open-source product. It provides developers with the ability to create responsive designs, meaning that the websites or applications built with Bootstrap can adapt and adjust their layout and design based on the device or screen size they are being viewed on. Therefore, all of the given statements are true about Bootstrap.
22.
What layout is used for providing 100% width in Bootstrap?
Correct Answer
B. Fluid layout
Explanation
The correct answer is "Fluid layout." In Bootstrap, a fluid layout is used to provide 100% width. This means that the content will expand or contract based on the size of the viewport, making it responsive and adaptable to different screen sizes. The fluid layout ensures that the content fills the available space, providing a seamless user experience across devices.
23.
Bootstrap global default font-size is
Correct Answer
B. 14px
Explanation
The correct answer is 14px. Bootstrap's global default font-size is set to 14 pixels. This means that all text within the Bootstrap framework will have a font-size of 14 pixels unless otherwise specified.
24.
Bootstrap’s grid system uses up to:
Correct Answer
A. 12 columns
Explanation
Bootstrap's grid system uses up to 12 columns. This means that when designing a layout using Bootstrap, the content can be divided into 12 equal-width columns. These columns can be easily rearranged and stacked on different screen sizes, allowing for a responsive design. By utilizing the grid system, developers can create flexible and dynamic layouts that adapt to various devices and screen resolutions.
25.
Through which class we can make a fixed navigation bar at the top?
Correct Answer
B. .navbar-fixed-top
Explanation
The correct answer is .navbar-fixed-top. This class can be used to create a fixed navigation bar at the top of the page. The "navbar-fixed-top" class is specifically designed for this purpose and can be applied to the navigation bar element to ensure that it remains fixed at the top of the page even when scrolling. The other option, .navbar-fixed, does not specifically indicate that the navigation bar should be placed at the top, so it is not the correct choice for this requirement.
26.
Which plugin is used to create tooltip?
Correct Answer
D. Tooltip
Explanation
The correct answer is "tooltip". A tooltip is a small pop-up box that appears when a user hovers over an element, providing additional information or context. It is commonly used to provide hints or explanations for icons, buttons, or links on a website or application. The tooltip plugin allows developers to easily create and customize tooltips with various styles and behaviors.
27.
Which of the following class is used to create a button as a link in bootstrap?
Correct Answer
B. .btn-link
Explanation
The correct answer is .btn-link. This class is used in Bootstrap to create a button that functions as a link. It provides the styling and behavior of a button, but when clicked, it navigates to a specified URL just like a regular anchor tag.
28.
Which class is used to make a standard /default button in bootstrap?
Correct Answer
C. .btn
Explanation
The correct answer is ".btn". This class is used to create a standard/default button in Bootstrap.
29.
Which of the following grid class is used for desktops?
Correct Answer
B. Md
Explanation
The "md" grid class is used for desktops. This class is specifically designed for medium-sized screens, which are typically found on desktop computers. It allows for more content to be displayed and provides better readability and user experience on larger screens. The "lg" class is typically used for large screens, "sm" for small screens, and "xs" for extra small screens.
30.
Bootstrap grid class is used for tablets?
Correct Answer
C. Sm
Explanation
The "sm" class in Bootstrap grid is used for tablets.
31.
How do you insert a comment in a CSS file?
Correct Answer
B. /* this is a comment */
Explanation
In CSS, comments are inserted using the /* and */ symbols. Therefore, the correct answer is /* this is a comment */. This syntax allows developers to add comments within their CSS code, which are ignored by the browser when rendering the webpage. Comments are useful for documenting the code, providing explanations, or temporarily disabling certain styles.
32.
Which plugin is used to create a modal window?
Correct Answer
A. Modal
Explanation
The correct answer is "modal" because a modal window is a type of window that requires the user to interact with it before they can return to the main application. It is often used to display important information or to prompt the user for input. The "modal" plugin would provide the necessary functionality to create and manage modal windows within a website or application.
33.
Javascript is _________ language.
Correct Answer
C. Scripting
Explanation
Javascript is considered a scripting language because it is primarily used to add interactivity and dynamic behavior to web pages. It is often embedded within HTML code and executed by web browsers. Unlike programming languages, scripting languages do not require compilation and can be interpreted and executed directly. Javascript's main purpose is to manipulate the Document Object Model (DOM) of a web page, allowing for the creation of interactive elements and user-friendly interfaces. Therefore, the correct answer is "Scripting".
34.
Syntax to change font type of a heading in HTML is
Correct Answer
B. <h1 style="font-family:verdana;">
Explanation
The correct answer is "". This is because the "font-family" property is used to specify the font type in CSS, and in this case, it is set to "verdana" for the heading.
35.
In HTML5, default character-set is known to be of
Correct Answer
D. UTF-8
Explanation
The default character-set in HTML5 is known as UTF-8. UTF-8 is a widely used character encoding that can represent all possible characters in the Unicode standard. It supports a wide range of languages and characters, making it the recommended character encoding for HTML documents.
36.
A TARGET value that is used when a webpage is opened in a new tab, is
Correct Answer
D. _blank
Explanation
When a webpage is opened in a new tab, the target value "_blank" is used. This target value instructs the browser to open the linked page in a new tab or window, depending on the user's browser settings. It is commonly used when you want to provide additional information or resources to the user without navigating away from the current page.
37.
Array elements are accessed using their
Correct Answer
D. Index
Explanation
Array elements are accessed using their index. In an array, each element is assigned a unique index value starting from 0. The index represents the position of an element within the array. By specifying the index value, we can retrieve or modify the value stored at that particular position in the array. Therefore, when accessing array elements, we use their index values to identify and manipulate the desired element.
38.
URL encoding replaces a space in URL with sign
Correct Answer
B. +
Explanation
URL encoding is a method used to convert special characters, including spaces, into a format that can be transmitted over the internet. In URL encoding, a space is replaced with the plus sign (+). This is because spaces are not allowed in URLs and need to be represented by a special character. Therefore, the correct answer is +.
39.
HTML element <div> describes
Correct Answer
C. Division
Explanation
The HTML element is used to create a division or a section in an HTML document. It is a container that allows you to group and organize other HTML elements. It is commonly used to separate content into different sections or to apply styling and formatting to a specific area of a webpage. Therefore, the correct answer is "division".
40.
A HTML element can be assigned a style through attribute named
Correct Answer
C. Style
Explanation
An HTML element can be assigned a style through the attribute named "Style". This attribute allows the developer to specify CSS rules directly within the HTML tag, affecting the appearance and layout of the element. By using the "Style" attribute, developers can define properties such as color, font size, background color, and more, providing a way to customize the visual presentation of the HTML elements on a webpage.
41.
Browsers displays <strong> tag as
Correct Answer
B. <b>
Explanation
The correct answer is . The tag is used to indicate text that should be displayed in a bold font. The tag is also used for the same purpose, so it can be used interchangeably with the tag. Both tags are used to emphasize text and make it stand out. The tag is used to display text in italics, while the tag is used to underline text.
42.
Attribute in HTML that defines location of where to open linked area, is said to be
Correct Answer
A. Target
Explanation
The correct answer is "Target" because the attribute in HTML that defines the location of where to open a linked area is called "target". This attribute is used to specify the name of the frame or window where the linked content should be displayed.
43.
Not a way to composite HTML Colors ?
Correct Answer
C. CNYK
Explanation
The correct answer is "CNYK" because it is not a valid way to composite HTML colors. The correct term is "CMYK," which stands for Cyan, Magenta, Yellow, and Key (black). CMYK is a color model used in printing, while RGBA, HSL, and HEX are valid ways to represent colors in HTML.
44.
All HTML documents must start with a declaration of
Correct Answer
B. <!DOCTYPE html>
Explanation
The correct answer is "". This is because the declaration is used to specify the version and type of HTML being used in the document. It tells the browser how to interpret and render the HTML code. Without this declaration, the browser may not render the HTML correctly or may go into quirks mode, which can cause compatibility issues.
45.
An element named content have other elements of
Correct Answer
A. 2 types
Explanation
The element named "content" has two types of other elements associated with it.
46.
Syntax of style attribute of HTML is
Correct Answer
B. <tagname style="property:value;">
Explanation
The correct answer is "". This is the correct syntax for the style attribute in HTML. It allows you to apply inline styles to a specific HTML element by specifying the property and its corresponding value. The style attribute is placed within the opening tag of the HTML element that you want to style.
47.
When an attribute of HTML value contains double quotes, it is necessary to use
Correct Answer
A. Single quotes
Explanation
When an attribute of HTML value contains double quotes, it is necessary to use single quotes. This is because using single quotes for the attribute value allows for the attribute itself to be enclosed in double quotes without causing any conflicts or syntax errors. By using single quotes, it ensures that the attribute value is correctly interpreted by the HTML parser.
48.
Element to use for making responsive webpages, is called
Correct Answer
B. <meta>
Explanation
The correct answer is . The element is used to provide metadata about the HTML document, including information about the viewport, which is crucial for making webpages responsive. The viewport meta tag allows the browser to adjust the webpage's layout and dimensions to fit different screen sizes and orientations, ensuring a better user experience on various devices.
49.
In HTML5, a list of pre-defined options for an <input> element can be defined through
Correct Answer
A. <datalist>
Explanation
The correct answer is . In HTML5, the element is used to define a list of pre-defined options for an element. It provides a dropdown list of options that users can choose from when filling out a form. This element is particularly useful when the number of options is large or when the options need to be dynamically generated based on user input or other factors.
50.
Numeric array values can be sorted through an array method named as
Correct Answer
D. Compare()