tag in the webpage. Hint: The userAgent property of the window.navigator object contains the user agent.
Answer:
Note that writeln() add a new line after each statement
var txt = "<p>User-agent header: " + navigator.userAgent + "</p>";
$("#agent").writeln(txt);
Then Anywhere in the body tag of the html file
create a div tag and include an id="agent"