Task:1
Design any real time sample form with 2 text boxes, radio button, checkboxes and a button to submit the form.
- Input type: TextBox
- Radio
- Checkbox
- Button
Steps:
- Create a division and make it as center.
- Give width, height, margin like css properties to the division.
- Create a table and give css properties like background-color, border-radius.
- Create a form within the table and make table heading wiht in the th tag.
- Create two input type text boxes and create a placeholder to give information about the text field.
- Create radio buttons and chechboxes.
- Create a submit button and remove its border.
- Use some css properties to change its layout.
Task:2
Simple form with different width, height and Default value input attributes.
- Width: Four of each textbox, radio and checkbox w=10,20,30
- Height: Four of each textbox, radio and checkbox h=10,20,30
- Maxlength: Four of each textbox, radio and checkbox ml=10,20,30
- Value: Four of each textbox, radio and checkbox v=10,20,30
- Size: Four of each textbox, radio and checkbox s=10,20,30
Steps:
- Create a form using form tag within the division and make it as center.
- Create four input type text boxes with four different sizes.
- Create two radio buttons with two different sizes by giving width and height.
- Create four checkboxes with four different sizes by giving with and height.
- Give maxlength for text type and value for radio.
Code:
Output:
Task:3
Apply the Attributes readonly, disabled and focus.
- Readonly: two text boxes with readonly=on readonly=off.
- Disabled: two text boxes with disabled=on disabled=off.
- Focus: two text boxes with focus=on try three forms with different focus for different elements.
Steps:
- Create a div and give some css properties i.e. width, height and background color.
- Kept heading as Registration form using h1 tag.
- Create a form using form tag.
- Create six text boxes with input type=text tag.
- Use css property Input:focus{background-color:yellow} to current mouse selected text box.
- Use css property readonly to two text boxes.
- Create three radio buttons and disable one of those radio button using disabled option.
- Create four checkboxes and make one of it as readonly.
- Create submit button and remove the border.
- Using padding make the submit button as bigger and make it's text color as grey.
- For all text boxes set margin-top is 8px and font-family is arial.
Task:4
Apply the styles.
- Use style tag.
- Apply css using id and class: Use ID and class to apply different styles.
- Give border: Give border to the text boxes with different sizes and one text box with no border.
- Border color: give different border color to 4 different sizes of input elements
- Background color: change the background color of the text box and radio button and checkboxes.
Steps:
- Create a div with proper height, width and background-color.
- Create a h1 tag as register form and fix its margin-top.
- Create a form using form tag and take some input fields.
- Create six types of input fields with different height, width, border type, padding and color.
- Use readonly and disabled attributes to input fields.