add an element in the DOM

I realise this page on html

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Size Checker</title>
    <script src="size.js" defer></script>
</head>

<body>
    

        <h1>Size Checker</h1>
    
    <time datetime="4:57:55 p.m"></time>
<ul>
<li class="screen">Screen:</li>
<li class="outer">Window Outer:</li>
<li class="inner">Window Inner:</li>
<li class="doc">Document:</li>
</ul>
</body>
</html>


my js:

const temps=document.querySelector('time').datetime;
let actuel=new Date() .toLocaleString();
temps.innerHTML=actuel;

const screen=document.querySelector('.screen');
const outer=document.querySelector('.outer');
const inner=document.querySelector('.inner');
const doc=document.querySelector('.doc');

const valeur=document.createElement("span");
screen.appendChild(span);
valeur.textContent="iuyfvkdjhjlf"

console.log(screen);


the problem he span elemnt don't appear on the html ?
can get some idea to fix it
z.jpg
Was this page helpful?