1.
What does HTML stand for?
Correct Answer
A. Hyper Text Markup Language
Explanation
HTML stands for Hyper Text Markup Language. It is the standard markup language used for creating web pages and web applications. It uses markup tags to structure the content and define the layout and appearance of the web page. Hyperlinks, which allow users to navigate between different web pages, are a key feature of HTML.
2.
Html:
Does the HTML above trigger a http request when the page first loads?
Correct Answer
A. Yes
Explanation
The HTML code provided does not contain any elements or attributes that would trigger an HTTP request when the page first loads. However, it is important to note that the given answer may be correct if there is additional code or scripts not shown in the given HTML snippet that could potentially initiate an HTTP request.
3.
HTML:
Does main1.css have to be downloaded and parsed before Hello World is alerted?
Correct Answer
A. Yes
Explanation
Yes, main1.css has to be downloaded and parsed before Hello World is alerted. This is because main1.css is an external CSS file that is linked to the HTML document. CSS files are typically loaded and parsed before the HTML content is rendered, so any CSS rules or styles defined in main1.css will be applied to the HTML elements. In this case, if there is a CSS rule in main1.css that affects the element responsible for the "Hello World" alert, it needs to be downloaded and parsed first in order for the alert to be displayed correctly.
4.
Is < keygen > a valid HTML5 tag?
Correct Answer
A. Yes
Explanation
The tag is a valid HTML5 tag. It is used to generate a key pair, consisting of a public key and a private key, which can be used for encryption and decryption purposes. This tag is mainly used in web forms where secure communication is required, such as for user authentication or digital signatures.
5.
Does the tag < bdo > change the direction of text?
Correct Answer
A. Yes
Explanation
The tag does indeed change the direction of text. It stands for "Bi-Directional Override" and allows you to override the default text direction of a document. This can be useful when dealing with languages that are read from right to left, such as Arabic or Hebrew. By using the tag, you can ensure that the text is displayed correctly according to the desired direction.
6.
HTML:
Is the above HTML valid?
Correct Answer
A. Yes
Explanation
The given HTML is valid because it follows the correct syntax and structure of HTML markup. It starts with the opening tag and ends with the closing tag. The content within the HTML tags is properly formatted and there are no errors or missing elements. Overall, the HTML code is complete and can be rendered correctly by web browsers.
7.
In what situation should you use the < small > tag?
Correct Answer
B. When you want to add copyright information inside a < footer >
Explanation
The tag is used to indicate smaller, fine print text. In this case, it would be appropriate to use the tag when adding copyright information inside a element. This helps to visually distinguish the copyright information from the rest of the content on the page. Using the tag in the other situation, to create a subheading after a element, would not be appropriate as it is intended for indicating smaller text rather than headings.
8.
If you have a page of search results and want to highlight the search term, what HTML tag would you use?
Correct Answer
C. < mark >
Explanation
The HTML tag that is used to highlight the search term in a page of search results is the tag. This tag is specifically designed to highlight or mark a section of text in a document. It is commonly used in search engines or text editors to visually distinguish the searched term from the rest of the content.
9.
HTML:
What does the scoped attribute do?
Correct Answer
B. Applies style rules to all children of the scoped parent element
Explanation
The scoped attribute in HTML applies style rules to all children of the scoped parent element. This means that any style rules specified within the scoped element will only affect the elements inside it, and not any other elements outside of it. It provides a way to encapsulate styles and limit their scope to a specific section of the HTML document.
10.
HTML:
Does the HTML above trigger a http request when the page first loads ?
Correct Answer
A. Yes
Explanation
Yes, the HTML above triggers an HTTP request when the page first loads. This is because HTML is a markup language used to structure the content of a webpage, and when a webpage is accessed, the browser makes an HTTP request to the server to fetch the HTML file. The server then responds with the HTML code, which is then rendered by the browser to display the webpage. Therefore, the HTML code itself does not directly trigger the request, but it is a necessary step in the process of loading a webpage.
11.
HTML:
Does main1.css have to be downloaded and parsed before main2.css can be fetched?
Correct Answer
B. No
Explanation
The question is asking whether the main1.css file needs to be downloaded and parsed before the main2.css file can be fetched. The correct answer is "No" because CSS files can be fetched and parsed independently of each other. The order in which the files are fetched does not affect their ability to be parsed.
12.
HTML:
Does main2.css have to be downloaded and parsed before Paragraph 1 is rendered on the page?
Correct Answer
A. Yes
Explanation
The main2.css file is an external CSS file that is linked to the HTML document. CSS files are responsible for styling the HTML elements on the page. In order for Paragraph 1 to be rendered on the page with the correct styling, the main2.css file needs to be downloaded and parsed first. This is because the CSS file contains the rules and instructions for how the elements should be displayed. Therefore, the correct answer is "Yes".
13.
Are CSS property names case-sensitive?
Correct Answer
B. No
Explanation
CSS property names are not case-sensitive. This means that whether you write a property name in uppercase or lowercase, it will still be recognized by the browser. For example, "color" and "COLOR" will both be understood as the same property. However, it is a best practice to consistently use lowercase letters for CSS property names to ensure consistency and readability in your code.
14.
Does setting margin-top and margin-bottom have an affect on an inline element?
Correct Answer
B. No
Explanation
Setting margin-top and margin-bottom does not have an effect on an inline element. Inline elements are displayed in a line next to each other and do not have any vertical space around them. Margins only affect block-level elements, which are displayed as blocks and have space around them. Therefore, setting margin-top and margin-bottom on an inline element will not change its position or spacing.
15.
Does setting padding-top and padding-bottom on an inline element add to its dimensions?
Correct Answer
B. No
Explanation
Setting padding-top and padding-bottom on an inline element does not add to its dimensions. Padding only affects the content within the element, not the overall size or dimensions of the element itself. Therefore, the padding will not increase the height or width of the inline element.
16.
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. No
Explanation
The font-size property with a value of 10rem sets the font size to 10 times the size of the root element's font size. This means that the font size will remain fixed and will not adjust responsively when the user resizes or drags the browser window.
17.
The pseudo class :checked will select inputs with type radio or checkbox, but not < option > elements.
Correct Answer
B. False
Explanation
The pseudo class :checked will select inputs with type radio or checkbox, but it will also select elements. Therefore, the given statement is false.
18.
In a HTML document, the pseudo class :root always refers to the < html > element.
Correct Answer
A. True
Explanation
The pseudo class :root in an HTML document always refers to the element. This is because the :root pseudo class represents the root element of the document, which is the element. Therefore, the statement is true.
19.
The translate() function can move the position of an element on the z-axis.
Correct Answer
B. False
Explanation
The translate() function is used to move the position of an element on the x-axis and y-axis, not the z-axis. Therefore, the given statement is false.
20.
What is the color of the text Sausage ?
HTML:
CSS:
Correct Answer
B. Blue
21.
What is the color of the text Sausage ?
HTML:
CSS:
Correct Answer
A. Red
22.
What is the color of the text Sausage ?
HTML:
CSS:
Correct Answer
B. Blue
Explanation
The color of the text "Sausage" is blue.
23.
What is the color of the text Sausage ?
HTML:
CSS:
Correct Answer
A. Red
24.
What will happen to the position of #example?
HTML:
CSS:
Correct Answer
B. All elements succeeding #example with move 5px upwards
Explanation
The position of #example will remain unchanged, but all elements succeeding #example will move 5px upwards.
25.
HTML:
CSS:
Are unused style resources still downloaded by the browser?
Correct Answer
B. No
Explanation
Unused style resources are not downloaded by the browser. This is because when the browser parses the HTML and encounters a link or import tag for a CSS file, it will only download and apply the styles if they are actually used on the page. If the styles are not used, the browser will skip downloading them to optimize performance and reduce unnecessary network requests.
26.
HTML:
CSS:
On page load, will mypic.jpg get downloaded by the browser?
Correct Answer
B. No
Explanation
The question is asking whether the image file "mypic.jpg" will be downloaded by the browser on page load. The answer is "No" because there is no HTML or CSS code provided in the question that would instruct the browser to download the image. Without any specific code to include the image on the page, the browser will not download it.
27.
CSS:
What is the use of the only selector?
Correct Answer
B. Stops older browsers from parsing the remainder of the selector
Explanation
The only selector is used to stop older browsers from parsing the remainder of the selector. This means that if a browser does not support the only selector, it will not apply any styles or rules that come after it in the selector. This can be useful for ensuring that certain styles are only applied to modern browsers that support the only selector, while older browsers will simply ignore those styles.
28.
CSS:
Does the screen keyword apply to the device's physical screen or the browser's viewport?
Correct Answer
B. Browser's viewport
Explanation
The screen keyword in CSS applies to the browser's viewport, not the device's physical screen. The viewport refers to the area of the web page that is currently visible to the user. This distinction is important because the size and dimensions of the viewport can vary depending on the device and browser being used. By using the screen keyword, developers can ensure that their CSS styles are applied specifically to the visible area of the webpage, providing a consistent experience across different devices and browsers.
29.
HTML:
CSS:
Does overflow: hidden create a new block formatting context?
Correct Answer
A. Yes
Explanation
The CSS property "overflow: hidden" does create a new block formatting context. This means that any content inside the element with this property will be contained within its own block, and will not interact with content outside of it. This can be useful for controlling the layout and positioning of elements on a webpage.
30.
What does the above statement evaluate to?
Correct Answer
B. 1234
Explanation
The above statement evaluates to the number 1234.
31.
What does the above statement evaluate to?
Correct Answer
C. 91
Explanation
The statement "10 4321 91" is not a valid mathematical expression. It appears to be a list of numbers separated by spaces. Therefore, it does not evaluate to a specific value. The answer "91" is likely just the last number in the list, but it does not represent the evaluation of the statement.
32.
What is alerted?
Correct Answer
A. 1
Explanation
The value that is alerted in this case is 1.
33.
What is alerted?
Correct Answer
B. Function
Explanation
The correct answer is "function" because when the code is executed, it will alert the word "function".
34.
What is the order of values alerted?
Correct Answer
E. 3, 1
Explanation
The order of values alerted is 3, 1.
35.
What value is alerted?
Correct Answer
D. 4
Explanation
The value that is alerted in this case is 4. This is because the last value in the list is the one that will be alerted.
36.
What value is alerted?
Correct Answer
B. 2
Explanation
The value that is alerted in this case is 2.
37.
What value is alerted?
Correct Answer
C. 3
Explanation
The value that is alerted is 3.
38.
What value is alerted?
Correct Answer
C. Undefined
Explanation
The value that is alerted in this case is "undefined". This is because there is no specific value assigned to be alerted in the given code. When a variable or object is not assigned a value, it is considered to be "undefined". Therefore, when the code is executed, it will alert the value of "undefined".
39.
What value is alerted?
Correct Answer
B. 2
Explanation
The value that is alerted in this case is 2. This is because the code is using the alert() function to display a value, and the value being passed to the function is 2. Therefore, when the code is executed, the alert will display the value 2.
40.
What value is alerted?
Correct Answer
B. 2
Explanation
The value that is alerted is 2.
41.
What value is alerted?
Correct Answer
A. Number
Explanation
The value that is alerted is a number.
42.
What are the two methods of forms transfer?
Correct Answer
B. Get and post
Explanation
The two methods of forms transfer are "Get" and "Post". The "Get" method is used to retrieve data from a server, while the "Post" method is used to send data to a server. These methods are commonly used in web development to transfer form data between the client and server.
43.
How many ways can you apply colors in CSS?
Correct Answer
C. 3
Explanation
There are three ways to apply colors in CSS. The first way is by using named colors, where you can directly specify the name of the color. The second way is by using hexadecimal color codes, where you can specify the color using a combination of six characters (0-9 and A-F). The third way is by using RGB values, where you can specify the amount of red, green, and blue to create a specific color.
44.
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 floating elements are allowed on either side of the cleared element. By using "clear:both", you are essentially clearing both the left and right floats, allowing the element to appear below any floated elements in the document flow.
45.
Which of the following is described as a collection of images put in a single image?
Correct Answer
C. Sprite
Explanation
A sprite is described as a collection of images put in a single image. Sprites are commonly used in computer graphics and game development to represent characters or objects that can be animated or interacted with. By combining multiple images into one, sprites can be easily manipulated and displayed on screen, making them a popular choice for creating animations and visual effects.
46.
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 object that is the parent or creator of the current object. It is used to access properties and methods of the owning object within the object itself.
47.
What is the runtime complexity of Fibonacci sequence?
Correct Answer
A. O(on)
Explanation
This is because the naive recursive implementation of the Fibonacci sequence has an exponential time complexity of O(2^n), where n is the input parameter representing the position of the desired Fibonacci number. This is due to the fact that each recursive call branches into two more recursive calls, leading to an exponential growth in the number of function calls and thus the runtime complexity.
48.
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 the Doctype declaration is used to specify the version of the markup language (such as HTML or XHTML) that the web page is written in. It is placed at the very beginning of the HTML document and informs the web browser about how to interpret and render the page correctly.