18.
What type of element will be rendered from the following code?
const element = (
<div>
<h1>Hello</h1>
<p>How are you?</p>
</div>
);
ReactDOM.render(element, document.getElementById('root'));
<div>
<h1>
<p>
<span>
Correct: A
The code will render a <div> element with an <h1> element containing the text "Hello" and a <p> element containing the text "How are you?". In React, you can define elements with multiple nested elements using JSX syntax. The ReactDOM.render() method is then used to render the overall element onto the specified DOM element with the id "root".