Answer & Solution
$('div').css('opacity', 0.5);
elements to 0.5?
<div>
elements to 0.5?
$('div').css('opacity', 0.5);
How to remove the href attribute from all anchor elements using jQuery?
A). $('a').removeAttr('href');
B). $('a').removeAttr('href');
C). $('a').deleteAttr('href');
D). $('a').removeAttribute('href');
Which jQuery method is used to set the value of the title attribute to 'New Title' for all elements?
A). $('a').attr('title', 'New Title');
B). $('a').title('New Title');
C). $('a').setAttribute('title', 'New Title');
D). $('a').titleAttr('New Title');
How to change the text content of all <h1>
elements to 'New Heading' using jQuery?
A). $('h1').html('New Heading');
B). $('h1').textContent = 'New Heading';
C). $('h1').text('New Heading');
D). $('h1').innerText('New Heading');
Which jQuery method is used to change the background color of all paragraphs to yellow?
A). $('p').css('background-color', 'yellow');
B). $('p').style('background-color', 'yellow');
C). $('p').bgColor('yellow');
D). $('p').background('yellow');
Which jQuery method is used to change the width of all <div>
elements to 300 pixels?
A). $('div').width('300px');
B). $('div').setWidth('300px');
C). $('div').css('width', '300px');
D). $('div').style('width', '300px');
Which jQuery method is used to change the height of all <div>
elements to 200 pixels?
A). $('div').height('200px');
B). $('div').setHeight('200px');
C). $('div').css('height', '200px');
D). $('div').style('height', '200px');
How to remove the class 'hidden' from all elements with the class 'element' using jQuery?
A). $('.element').removeClass('hidden');
B). $('.element').remove('hidden');
C). $('.element').deleteClass('hidden');
D). $('.element').removeClassName('hidden');
How to change the font family of all<p>
elements to 'Arial' using jQuery?
A). $('p').style('font-family', 'Arial');
B). $('p').fontFamily('Arial');
C). $('p').css('font-family', 'Arial');
D). $('p').font('Arial');
Which jQuery method is used to change the HTML content of all <div>
elements?
A). New paragraph$('div').innerHtml('
B). New paragraph$('div').html('
C). New paragraph$('div').innerHTML('
D). New paragraph$('div').setContent('
Which jQuery method is used to add the class 'highlight' to all <div>
elements?
A). $('div').addClass('highlight');
B). $('div').class('highlight');
C). $('div').attr('class', 'highlight');
D). $('div').applyClass('highlight');
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP