WEB Fundamentals Multiple Choice Questions Answers offer a comprehensive set of multiple choice questions with answers designed to test your knowledge of the fundamental principles and concepts that underlie the world of web development and design. Whether you’re a beginner looking to solidify your understanding or a seasoned professional aiming to stay sharp, these MCQs cover a wide range of topics, from HTML and CSS to web technologies and best practices. Challenge yourself and expand your expertise in the dynamic and ever-evolving field of web fundamentals with these thought-provoking questions.These MCQs will help students in university exams,competitive exams and interviews preparation.
1. ____________ are typically defined using the '%' character followed by the entity name.
- Parameter entities.
- Ignore entities.
- Percent entities
- Normal entities.
In the context of XML and DTD (Document Type Definition), parameter entities are used to define reusable entities within the DTD. They allow you to create shortcuts or placeholders for commonly used pieces of markup. Parameter entities are typically defined using the '%' character followed by the entity name.
For example, consider the following parameter entity definition:
<!ENTITY % myEntity "<element>Some content</element>">
Here, %myEntity
is the parameter entity, and it represents the markup <element>Some content</element>
. This parameter entity can be used in other parts of the DTD, providing a way to reuse the same markup without repeating it.
Parameter entities are often used to organize and modularize DTDs, making them easier to maintain and understand.
Learn more about : What is Parameter entities in the context of XML and DTD (Document Type Definition)?
2. Which of the following is NOT a fundamental component of web development?
- HTML
- CSS
- JavaScript
- SQL
While SQL (Structured Query Language) is essential for interacting with relational databases and retrieving data, it is not a core component of web development itself. Web development primarily involves creating and structuring web pages using HTML (Hypertext Markup Language), styling them using CSS (Cascading Style Sheets), and adding interactivity and functionality using JavaScript. SQL comes into play when you need to store, retrieve, and manage data on the server-side, but it is not directly related to the front-end development of web pages.
3. XML documents are called ________ sections
- CDATA
- EDATA
- scripting code.
- parser
CDATA stands for "Character Data" and refers to a section within an XML document where characters are used as data rather than markup. It is often used to include blocks of text or data that may contain special characters or reserved symbols that could otherwise be misinterpreted as XML markup.
CDATA sections are defined by enclosing the desired content within the `<![CDATA[` and `]]>` delimiters. For example:
```xml <description> <![CDATA[ This is a CDATA section. It can contain special characters like <, >, &, and ". This content will be treated as character data. ]]> </description> ```
In the above example, the content within the CDATA section will be treated as literal character data and will not be parsed as XML markup. This allows you to include text or data that would otherwise require escaping or encoding to be properly represented within an XML document.
4. The ____ and ______ attributes specify the layout of frames within the browser window.
- frames and frameset.
- font and style.
- cols and rows
- forms and fonts.
The `cols` and `rows` attributes are used to specify the layout of frames within the browser window.
In the context of HTML framesets, the `cols` attribute is used to define the width of individual frames arranged horizontally, while the `rows` attribute is used to define the height of frames arranged vertically.
Here's an example usage of `cols` and `rows` attributes:
```html <frameset cols="25%, 75%"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> ```
In the above example, the `cols` attribute divides the width of the frameset into two columns, where the first frame occupies 25% of the width, and the second frame occupies 75% of the width.
Similarly, the `rows` attribute can be used to define the height of frames:
```html <frameset rows="50%, 50%"> <frame src="frame1.html"> <frame src="frame2.html"> </frameset> ```
In this case, the `rows` attribute divides the height of the frameset into two rows, each occupying 50% of the height.
Note that the use of framesets is considered outdated in modern web development, and alternative approaches like CSS layouts, flexbox, or grid systems are often preferred.
5. The ________ attribute in an input element inserts a button that, when click will clear the contents of reset.
- type =”reset”
- ype = “input”.
- type = “thread”.
- type = ” “.
The `type` attribute with the value of "reset" in an input element inserts a button that, when clicked, will clear the contents of the form inputs and reset them to their initial values.
Here's an example of an input element with the `type` attribute set to "reset":
```html <input type="reset" value="Reset Form"> ```
In the above example, the input element with `type="reset"` will display a button labeled "Reset Form". When this button is clicked, it triggers the form reset action, clearing the user-entered values in the form inputs and reverting them to their original or default values.
It's important to note that the `reset` type is specific to input elements within HTML forms and serves the purpose of resetting form fields.
6. CSS introduces the position property and a capability called ________.
- absolute
- position property.
- "CSS positioning" or "CSS layout positioning."
- positioned
CSS introduces the position property and a capability called "CSS positioning" or "CSS layout positioning."
The position property in CSS allows you to control the positioning of an element within the document flow. It provides different positioning options, including:
1. Static (default): Elements are positioned according to the normal document flow.
2. Relative: Elements are positioned relative to their normal position in the document flow. They can be moved using top, right, bottom, and left properties.
3. Absolute: Elements are positioned relative to the nearest positioned ancestor or to the initial containing block. They can be moved using top, right, bottom, and left properties.
4. Fixed: Elements are positioned relative to the viewport, meaning they remain fixed in their position even when scrolling the page.
In addition to these positioning options, CSS layout positioning techniques allow you to achieve more complex and flexible layouts. These techniques include:
1. Flexbox: A one-dimensional layout model that allows elements to be organized in rows or columns, providing flexibility in their size, alignment, and order.
2. Grid: A two-dimensional layout model that allows you to create complex grid-based layouts. It provides precise control over the placement and alignment of elements.
3. CSS Floats: Floats were traditionally used for layout positioning before the advent of Flexbox and Grid. They allow elements to be moved to the left or right of their containing element, which can be useful for creating simple column-based layouts.
By combining the position property with these layout positioning techniques, you can create sophisticated and responsive page layouts in CSS.
7. Which of the following is not correct?
- 110101002 = 324 base 8
- 01 1011 0100 base 2 = 2B4 base 8
- 1 01 01 0 110 base 2 = 526 base 8 = 156 base 16
- 34 base 8 = 24 base 16
The statement "34 base 8 = 24 base 16" is incorrect. The correct conversion is "34 base 8 = 70 base 16".
To check if the conversion from base 8 (octal) to base 16 (hexadecimal) is correct, we need to convert the number 34 in base 8 to base 16.
34 base 8 = ?
To convert from octal to hexadecimal, we can first convert the octal number to binary and then convert the binary number to hexadecimal.
Converting 34 from octal to binary:
3 (in octal) = 011 (in binary)
4 (in octal) = 100 (in binary)
Concatenating the binary digits: 011100
Converting the binary number to hexadecimal:
0111 = 7 (in hexadecimal)
00 = 0 (in hexadecimal)
Combining the hexadecimal digits: 70
Therefore, the conversion from 34 base 8 to base 16 is 70.
So, the statement "34 base 8 = 24 base 16" is incorrect. The correct conversion is "34 base 8 = 70 base 16".
8. Match the following terms:
- 1-c, 2-d, 3-a, 4-b
- 1-d, 2-c, 3-b, 4-a
- 1-d, 2-a, 3-b, 4-c
- 1-b, 2-a, 3-c, 4-d
9. To represent one billion (1 billion = 1000 million), minimum number of bits needed are
- 12
- 30
- 15
- 20
10. Match the following terms:
- 1-c, 2-d, 3-a, 4-b
- 1-b, 2-a, 3-c, 4-d
- 1-d, 2-c, 3-b, 4-a
- 1-d, 2-c, 3-a, 4-b