Hello, there is a code:

<html> <head> <meta charset = "UTF - 8"> <title>Форма</title> <script src="window.js"></script> </head> <body> <h1 align = "center">Создание таблици</h1> <form action = ""> <fieldset> <label>Введите число: </label> <input type = "text" id = "txtName" /> <input type="button" value="Построение таблици" onClick=""> </fieldset> </form> </body> </html> 

I would like the form to be located in the center of the page (with the input field blo above the button), had a certain size, and its frame had rounded edges. How to do it? If you think. that the code is incorrect for correct, please indicate the flaw.

    1 answer 1

     h1 { text-align: center; } form { border: 1px solid black; border-radius: 5px; width:400px; margin:0 auto; } fieldset { text-align: center; border: none; } fieldset input[type=button] { display: block; margin: 20px auto 0px auto; } 
     <html> <head> <meta charset="UTF-8"> <title>Форма</title> <script src="window.js"></script> </head> <body> <h1>Создание таблици</h1> <form action="POST"> <fieldset> <label for="txtName">Введите число:</label> <input type="text" id="txtName"> <input type="button" value="Построение таблици"> </fieldset> </form> </body> </html> 

    • Thanks, and adding background: ..... to the form, you can set its color? - Muscled Boy
    • and what does the post attribute do in the form? - Muscled Boy
    • You can, background sets the background of any element. Post is a method of transferring data from the form, you need to at least indicate something POST or GET - EatMyDust
    • thanks again - Muscled Boy
    • and for the form to be in the center of the page (vertically), is it valign: middle? - Muscled Boy