Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Need code for template file to generate html file with different title and html file name based on user input

I want to generate a template html file, based on variable name (which will be changing dynamically based on user input) the title and some other variable names will be replaced from user input. How to achieve this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If I understood your problem, you have an application, from which you are taking inputs from users to create an HTML template.

You can use javascript string literals

createHTMLTemplate(userInput){
return `<!DOCTYPE html>
<html>
<head>
<title>${userInput.title}</title>
</head>
<body>

<h1 style="background-color: red;">Hello World!</h1>
<p>${userInput.anyothervariable}</p>

</body>
</html>
`
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!