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

256
Views
Unable to change HTML element <h1> to a <form> as a function response to HTTPS request using node.js (Express)

If I try to change "

Hello World

" to "label>Your Name it fails to render. what a i doing wrong? See code below...


const express = require("express");

const app = express();

app.get("/currenttime", function (request, response) {
  response.send("<h1>" + new Date().toDateString() + "</h1>");
}); // localhost:3000/currenttime

app.get("/", function (request, response) {
  response.send("<form><label>Your Name</label><input type='text'></form>");
}); //localhost:3000/

app.listen(3000);

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

0

You need to add closing tag for your input element.

const express = require("express");

const app = express();

app.get("/currenttime", function (request, response) {
  response.send("<h1>" + new Date().toDateString() + "</h1>");
}); // localhost:3000/currenttime

app.get("/", function (request, response) {
  response.send("<form><label>Your Name</label><input type='text' / ></form>");
}); //localhost:3000/

app.listen(3000);
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!