HTML & CSS- part 9 Flashcards
How do you code a form’s submit button?
<input type=”submit”
value=”Send email message”>
The first part creates the button that submits the form when the user clicks on it.
The “value” part is the button text. Instead of “Send email message,” it could be “Submit,” “Send,” “Subscribe,” “Purchase,” or any other text you want.
Is there an alternate to the standard submit button in a form?
If you want a custom button, create your own button image and write a tag like this.
<input type=”image” src=”images/subscribe-button.png” alt=”Sign up” width=”72” height=”18”>
What are the parts of a radio tag in the world of forms?
<input type=”radio”
name=”found-thru”
value=”Google” checked=”checked”> Google
*Each radio button gets its own tag.
*The NAME is what binds a group together.
*checked=”checked” This is optional. The tag that includes this will be selected by default.
In the world of forms, how do “checkboxes” work?
Exactly the same as “radio” except you can select more than one.
What’s a select box also known as?
A drop-down box
How do you code a select box?
<select name=”x”>
<option value=”cherries”>Cherries</option>
</select>
In a select box, how do you keep people from picking the default answer?
Assign it an option value=”did not select” or something like that.
What’s the mnemonic for remembering the code for a select box?
SNOV
select-name option-value
What are five types of input in HTML?
text
textarea
submit/image submit
radio/checkbox
select box
What are the fields in a text input?
name
rows
cols
What are the fields in a submit input?
value
What are the fields in a submit input using an image?
src
alt
width
height
What are the fields in for a radio/checkbox input?
name
value
(opt) checked
Which accessibility feature makes the text clickable so you don’t have to aim for just the radio button?
<label>
As a bonus, they cause the screen reader to read the text</label>
What sucks about using <label> in a form?
They have to be added individually to each field, text area, radio button, checkbox, and selection option.