+ 1

how to display html tag from user input form

i want a form that display html tag from user input. like when user insert name , image, address. i want to display like this in the output: <h1 class="header">Name</h1> <img src=""> <p class="about">address</p> so that user can copy the html tag with their text input. Want this program using html and js

17th Mar 2021, 5:02 PM
Dipananda Sharma
Dipananda Sharma - avatar
9 odpowiedzi
+ 4
I tried to understand your question, and here's my try to explain solution.. For example, You create form that takes user's name as input ,then... <form method="post"> <input type="text" placeholder="name" /> </form> But you display this form's output in your browser with HTML tags .. Then,... You can go with HTML character entities, like this.. &lt;h1 class=&quot;header&quot; &gt; Name &lt;/h1&gt; Where, &lt; is equal to < &gt; is > and &quot is for quotation... Similarly, you can find more html character entities from here.. https://www.w3schools.com/html/html_entities.asp
19th Mar 2021, 3:32 PM
axita
axita - avatar
+ 1
don't post duplicate: you still have answers here: https://www.sololearn.com/Discuss/2728113/?ref=app
17th Mar 2021, 5:05 PM
visph
visph - avatar
+ 1
so reply in other thread to be more descriptive (and explain why answers doesn't suit your needs)
17th Mar 2021, 5:30 PM
visph
visph - avatar
0
sir that answer makes no sense to my question. thats why i upload the question with clear explanation. hope you know it.
17th Mar 2021, 5:28 PM
Dipananda Sharma
Dipananda Sharma - avatar
0
i say form and you tell the solution to output html from editor. I say form that display html tag from user input
17th Mar 2021, 5:31 PM
Dipananda Sharma
Dipananda Sharma - avatar
0
Sir, please read the question first.
17th Mar 2021, 5:32 PM
Dipananda Sharma
Dipananda Sharma - avatar
0
Hello Zlatka I know that form tag. What i want is when user insert thier name on that form, i want to display with html tag in the browser
18th Mar 2021, 1:18 AM
Dipananda Sharma
Dipananda Sharma - avatar
- 1
Thanks Axita.
19th Mar 2021, 3:34 PM
Dipananda Sharma
Dipananda Sharma - avatar