FILL TEXT BOX WITH A SPRECIFIC TEXT USING HTML
To fill a text box with specific text using HTML, you can use the value
attribute within an <input>
element. Here’s a simple example:
Program:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pre-filled Text Box</title> </head> <body> <input type="text" value="This is the pre-filled text"> </body> </html>
This approach allows you to pre-fill or dynamically change the content of a text box based on your needs using simple HTML and JavaScript techniques.