Boolean Attributes - HTML CSS HTML

HTML CSS examples for HTML:Attribute

Introduction

Some attributes are Boolean attributes. You don't have to specify a value for these attributes, just add the attribute name to the element.

Enter your name: <input disabled>

The Boolean attribute in this example is disabled.

You can assign the empty string "" or set the value to be the name of the attribute.

Enter your name: <input disabled="">
Enter your name: <input disabled="disabled">

Related Tutorials