117k views
2 votes
complete the javascript code to set the paragraph's inline style to use the times font family and remove the paragraph's margin property.

User Dckuehn
by
7.6k points

1 Answer

4 votes

in javascript:

// Get the paragraph element

var paragraph = document.getElementById("myParagraph");

// Set the font-family property to Times

paragraph.style.fontFamily = "Times";

// Remove the margin property

paragraph.style.margin = "0";

CSS:

.times-font-no-margin{

font-family: Times;

margin: 0;

}

User Thomas Williams
by
8.5k points