Found 2202 Articles for HTML

How to Create Checkbox with a Clickable Label?

Eesha Gandhi
Updated on 11-Sep-2023 12:17:14

1K+ Views

The HTML tag is used to define the square boxes that are ticked (checked) when activated. Checkboxes are used to allow a user to select one or more options from a limited number of options. The type attribute of the element, as shown in the following syntax, creates it. Checkbox supports the following attributes: Checked: A Boolean attribute that indicates whether this checkbox is checked by default (when the page loads). It does not indicate whether this checkbox is currently checked: if the checkbox's state changes, this content attribute does not update. Value: The value ... Read More

How to Create Button with Line Breaks?

Eesha Gandhi
Updated on 11-Sep-2023 12:00:15

4K+ Views

The HTML element is an interactive element that a user can activate with a mouse click or keyboard shortcut. It performs a programmable action, such as submitting a form or opening a dialogue, once activated. Buttons are typically created using the HTML , or tags. Syntax Apart from the ‘type’ attribute, the button tag uses other attributes such as autofocus, disabled, form, formaction, formmethod, value etc. When a button contains a long text it becomes necessary to add line breaks while creating it. There are a couple of ways of achieving this as discussed ... Read More

How to Create an HTML Table with a Fixed Left Column and Scrollable Body?

Eesha Gandhi
Updated on 11-Sep-2023 11:57:59

3K+ Views

A table is basically a structured collection of data comprising of rows and columns (tabular data). HTML tables enable web designers to organize data like text, images, links, other tables, and so on into rows and columns of cells. They are created with the tag, which incorporates the tag for table rows, the tag for table headers and the tag for data cells. By default, the elements under are regular and left aligned. ExampleLet us have a look at the example below which demonstrates a simple table in HTML. ... Read More

How to Create a Two-Column Div Layout with the Right Column Having Fixed Width?

Eesha Gandhi
Updated on 11-Sep-2023 11:54:44

866 Views

The element is one of the most widely used elements in HTML. The term "" refers to a container that divides the page into sections. These sections are extremely useful for grouping elements together. elements don’t inherently have a visual representation, but they are very useful when we want to apply custom styles to our HTML elements. They allow us to group elements to apply the same styles for all elements inside. We can also style the entire div> element. It is simple to style by using the class or id attribute. ExampleHere is a simple example showing ... Read More

How to Create a Teardrop in HTML?

Eesha Gandhi
Updated on 11-Sep-2023 11:47:42

412 Views

Creating shapes using HTML and CSS is quite an easy task until the shape is not very complex. A class and CSS styling properties like height, width and border can help us create shapes like square, rectangle, circle, triangle etc. Here is a simple example of making a square shape using HTML and CSS only. Example body{ margin:30px; } ... Read More

How to Create a List with Dashes in HTML?

Eesha Gandhi
Updated on 11-Sep-2023 11:41:56

7K+ Views

A list is any information that is displayed in a logical or linear format. It is a collection of items written in a meaningful group or sequence and denoted by bullet points, numbers, and so on. HTML Lists aid in the semantic display of a list of information. In HTML, there are three types of lists: Unordered list or Bulleted list (ul)The list items in an HTML unordered list are not in any particular order or sequence. Because the items are marked with bullets, an unordered list is also known as a Bulleted list. It begins with the ... Read More

How to Create a Hidden Div without a Line Break or Horizontal Space?

Eesha Gandhi
Updated on 11-Sep-2023 11:34:11

891 Views

The HTML division tag, abbreviated "div, " is a special element that allows you to group together similar sets of content on a web page. It can be used as a generic container to group together similar content. The tag is thus used to divide an HTML document into sections. CSS styles can also be applied to multiple elements at once by using the tag. The div tag is versatile; we can use it to accomplish a variety of tasks on a web page. We mostly use it in web layouts and CSS art, but it's extremely versatile. ... Read More

How to Control the Space between Bullets and <li> Elements?

Eesha Gandhi
Updated on 11-Sep-2023 12:56:53

2K+ Views

A list is a collection of short pieces of related information that can be used to display data or information on web pages in either an ordered or unordered format. HTML Lists are used to specify informational lists. All lists can have one or more list elements. There are three kinds of HTML lists: Ordered or numbered list (ol): This will list items using schemes of numbers. Unordered or Bulleted List (ul): This will list items using plain bullets. List of Definitions or List of Descriptions (dl): This will arrange items in the dictionary format. We can make ... Read More

How to Assign a Checked Initial Value to the Radio Button

Eesha Gandhi
Updated on 11-Sep-2023 10:50:45

615 Views

Using the HTML element, we can take input from users in a variety of ways. One such method is to collect input by giving users options from which to choose. We use HTML Radio buttons for this purpose, giving users a variety of options from which to choose their response. The HTML Radio button defines the small circles that are highlighted when clicked. When a label is linked to a radio button, clicking the label selects the radio button. These buttons are typically displayed in radio groups (a collection of radio buttons describing a set of related options). ... Read More

How to Allow the File Input Type to Accept Only Image Files

Eesha Gandhi
Updated on 11-Sep-2023 10:47:17

4K+ Views

The tag in HTML creates an input control that accepts user input. Depending on the kind of the attribute, an input field might be of different forms. It is a blank element with only attributes.The tag is typically found within the tag and can be used to represent text fields, checkboxes, dropdowns, buttons, and other inputs by simply setting the appropriate type attribute. It has many other attributes such as value, placeholder, name, accept, size, height, width etc. The behaviour of an tag varies greatly depending on the value of its type attribute. The type ... Read More

Advertisements