TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

HTML

HTML Checkboxes

Overview

HTML Checkboxes are used when we allow user to select one or more options. If we want the user to select only one option then we should be using Radio button.

https://www.testingdocs.com/html-radio-button/

Syntax

<input type=”checkbox” name=”cbDemo” value=”linux”>Linux

We can add the default selection with checked:
<input type=”checkbox” name=”cbDemo” value=”linux” checked>Linux

Example

<html>
<!–
####################################
# HTML Checkboxes Demo
# www.TestingDocs.com
####################################
–>
<head>
<title> HTML Tutorials – HTML Checkboxes Demo</title>
</head>

<body>
<h1> HTML Checkboxes Demo </h1>

<form>
<br/>
<strong>Choose the operating systems you use::</strong>
<br/>
<input type=”checkbox” name=”cbDemo” value=”Linux”>Linux
<br/>
<br/>
<input type=”checkbox” name=”cbDemo” value=”Windows”>Windows
<br/>
<br/>
<input type=”checkbox” name=”cbDemo” value=”Mac”>Mac OS
<br/>
<br/>
<input type=”checkbox” name=”cbDemo” value=”iOS”>iOS
<br/>
<br/>
<input type=”checkbox” name=”cbDemo” value=”Android”>Android
<br/>
<br/>
<input id=”submit” type=”submit”/>
<br/>
<br/>
</form>
<p>
<h2>
HTML Tutorials – www.TestingDocs.com
</h2>
</p>

</body>
</html>

Sample Output

HTML Checkboxes

—

HTML Tutorials

HTML Tutorials on this website:

https://www.testingdocs.com/html-tutorials/

More Information on HTML:

https://www.w3.org/TR/html401/intro/intro.html

Related Posts

Create HTML File

HTML /

Create HTML file with NetBeans IDE

HTML /

HTML5 Document Structure

HTML /

Introduction To HTML5

HTML5 Application NetBeans

HTML /

Create an HTML5 Application using NetBeans IDE

CSS Validator Tool

HTML /

HTML & CSS Validator Tools

‹ HTML Radio Button› Cascading Style Sheets

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version