'How can I print the data from the form side by side in the textarea?

I really hope someone can point out my mistake here. This is the code that I have tried.

<p>Name :<p id="text1"></p></p>
    <p>Address :<p id="text2"></p></p>
    <p>City :<p id="text3"></p></p>
    <p>E-mail :<p id="text4"></p></p>

--The output should display like this --

Name : Jake

Address : Tronoh

City : Perak

E-mail : [email protected]

--But it turned out to be like this instead --

Name :

Jake

Address :

Tronoh

City :

Perak

E-mail :

[email protected]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source