72.3k views
1 vote
Use the writeln() method of the document object to display the inner height in a

tag in the webpage.



a) document.writeln("

Inner Height: " + window.innerHeight + "

");
b) document.write("

Inner Height: " + window.innerHeight + "

");
c) document.innerheight("

Inner Height: " + window.innerHeight + "

");
d) document.innerHTML("

Inner Height: " + window.innerHeight + "

");

1 Answer

3 votes

Final answer:

The correct option is a) document.writeln("Inner Height: " + window.innerHeight + "");

Step-by-step explanation:

The correct answer to the question is option a) document.writeln("Inner Height: " + window.innerHeight + "");

This method can be used in JavaScript to display the inner height of a webpage in a paragraph tag. The writeln() method is used to write text on a webpage, while the window.innerHeight property returns the height of the browser window.

Therefore, by combining the two, we can use the document.writeln() method to display the inner height by concatenating the text 'Inner Height: ' with the value of window.innerHeight.

User Vladi Feldman
by
8.2k points