Which line of code should you use?

An HTML page contains no embedded JavaScript or CSS code. The body of the page
contains only the following line of code.
<p id=”test”>test</p>
A CSS style sheet must be applied dynamically. The style must visibly change the
appearance of the paragraph on the page.
You need to apply a style the paragraph.
Which line of code should you use?

An HTML page contains no embedded JavaScript or CSS code. The body of the page
contains only the following line of code.
<p id=”test”>test</p>
A CSS style sheet must be applied dynamically. The style must visibly change the
appearance of the paragraph on the page.
You need to apply a style the paragraph.
Which line of code should you use?

A.
document.getElementById(“test”).style.border = “0”;

B.
document.getElementById(“test”).style.position = “static”;

C.
document.getElementById (“test”).style.padding = “15px”;

D.
document.getElementById(“test”).style.top = “5px”;

Explanation:
A: The border shorthand property sets all the border properties in one declaration.
The properties that can be set, are (in order): border-width, border-style, and border-color.
It does not matter if one of the values above are missing, e.g. border:solid #ff0000; is
allowed.



Leave a Reply 11

Your email address will not be published. Required fields are marked *


freedeveloper

freedeveloper

A This is wrong a style with border 0 does not made a “visible” change in the page. because the paragraph has no border.
B,D are default position in this case that it is the first and only code in the page
C IS CORRECT, this move the text of the paragraph, 15 px to right and it is visible the change in the page.

Aires

Aires

Indeed, I agree with you, I also have checked the code, and C is the correct answer.

Google

Google

Every when inside a even though we decide on blogs that we study. Listed beneath would be the most current websites that we opt for.

endurance training for battle

endurance training for battle

here are some links to web pages that we link to due to the fact we think they may be worth visiting

it services omaha

it services omaha

always a huge fan of linking to bloggers that I adore but really don’t get lots of link really like from

Google

Google

Although internet websites we backlink to beneath are considerably not related to ours, we feel they’re essentially really worth a go through, so have a look.

Alaeddin

Alaeddin

its C , after test it

Sanjay Soni

Sanjay Soni

test

// document.getElementById(“test”).style.border = “0”;
// document.getElementById(“test”).style.position = “static”;
document.getElementById (“test”).style.padding = “15px”;
//document.getElementById(“test”).style.top = “5px”;

tested C is correct.

Foor Manchu

Foor Manchu

Just passed 70-480 after 3 times!!! Passed with a score of 900!!!

Around 15%-18% new questions.

Pay close attention to questions on these points:
– about priority when there is multiple event (div inside div and each dive has a click event)
– css priority (div.class or #id wich give color)
– overflow horizontal or vertical

Dumps from this AIO site are not enough for 100% passing. I also learned the premium PL dumps (247Q) here: http://www.passleader.com/70-480.html (recommend!)