I have searched many sites, and i have done everything as it was stated, however my code still wont work.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cím</title>
<style>
#yourname {
color: red;
font-size: 16pt;
}
#yourbday {
color: blue;
font-weight: bold;
font-size: 16pt;
}
</style>
<script>
function starting(yname, ybday){
alert ("Hi");
var yname = prompt ("What's your name?");
var ybday = prompt ("What's your age?", "20");
document.write("<span id='yourname'>" + yname + "</span>");
}
</script>
</head>
<body onload="starting()">
</body>
However, in the body, the your name string is not formatted. How can I solve this problem? Thanks!