How to display the input type elements in the php code in the same page

I am trying this code but it is not working

HTML

```
<html>
<input type="text" name="keywords" id="keywordsid" value="sample keyword" />
</html>

```

PHP code 

```
<?php
echo $kewords;
    ?>

```

To display html input type fields in the php code what should we do?