-
Adding an Image to a Web Page
-
The role of images in a webpage
-
Specifying locations in web pages
-
Customizing Links
-
Exploring link options
-
Basic links
-
Why links?
-
Submit and Reset buttons
-
Multiline text boxes
-
Drop-down list fields
-
File upload fields
-
Hidden fields
-
Checkboxes and radio buttons
-
Password fields
-
Text fields
-
Input tags
-
Creating forms
-
How a form looks like?
-
Adding Headers Cells
-
Creating a Basic Table
-
Description list
-
Unordered list
-
Ordered list
-
Lists
-
More formatting elements
-
Other text elements
-
Working with language elements
-
Abbreviations, Definitions, Quotations and Citations
-
Creating Breaks
-
Basic text formatting elements
-
Creating a page from scratch using VS Code
-
Creating a page from scratch using Notepad
-
Setting Up the Basic Document Structure
-
Parents, Children, Descendants and Siblings
-
The Outer Structure of an HTML Document
-
Element Attributes
-
HTML elements
-
How HTML creates a website
-
Creating HTML markup
-
How a website works
-
Web Browsers vs Web Servers and Internet/HTTP
-
Webpage vs Website
Checkboxes and radio buttons
If only a finite set of possible values is available to the user, you can give him a collection of options to choose from:
- Check boxes: Choose more than one option.
- Radio buttons: Choose only one option.
Radio buttons differ from check boxes in an important way:
“Users can select a single radio button from a set of options but can select any number of check boxes (including none, one, or more than one).”
If many choices are available (more than half a dozen), use a drop-down list instead of radio buttons or check boxes.
To create radio buttons and check boxes, take these steps:
- Use the <input> element with the type attribute set to radio or checkbox.
- Create each option with these attributes:
- name: Give the option a name.
- value: Specify what value is returned if the user selects the option.
You can also use the checked attribute (with a value of checked) to specify that an option should be already selected when the browser displays the form. This is a good way to specify a default selection. This markup shows how to format check box and radio button options:https://stackblitz.com/edit/web-platform-t3ryj9?embed=1&file=index.html&hideDevTools=1&hideExplorer=1&hideNavigation=1
In the preceding markup, each set of options uses the same name for each input control but gives a different value to each option. You give each item in a set of options the same name to let the browser know they’re part of a set. If you want to, you can select as many check boxes as you like by default in the page markup — simply include checked=”checked” in each <input> element you want selected in advance.