Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Front End Technology Articles
Page 49 of 652
HTML5 Input Types You May Not Be Using
HTML5 introduced several specialized input types that enhance user experience and reduce the need for custom JavaScript validation. Many developers overlook these powerful input types that can significantly improve form usability, especially on mobile devices. Syntax Following is the basic syntax for HTML5 input types − Where inputType is one of the HTML5 input types like tel, date, email, etc., and additional attributes provide specific constraints and behaviors. HTML5 Input Types Overview Following table lists the specialized HTML5 input types and their primary purposes − Input Type ...
Read MoreHow to Render an HTML String Preserving Spaces and Line Breaks?
When creating HTML content, you may need to preserve multiple spaces, tabs, and line breaks exactly as they appear in your source code. By default, HTML collapses multiple whitespace characters into a single space and ignores line breaks. The and tags will not display extra spaces or line breaks as written in your HTML file. This article demonstrates two effective methods to render HTML strings while preserving all original spacing and line breaks. Method Overview Using the HTML Tag Using the CSS white-space Property Using the HTML Tag The ...
Read MoreHow to Display Unordered List in Two Columns?
In HTML, unordered lists are collections of items that do not have to be in any particular order. To list these items, we frequently use simple bullet points and that is why they are often known as bulleted lists. An unordered list begins with the tag and closes with a tag. The list items begin with the tag and end with tag. The tag, which stands for unordered list, is the tag's parent. This means that the tag is the tag's child. By default, unordered lists display items in a single ...
Read MoreHow to Create a Form with Custom Buttons in HTML
Buttons are interactive HTML elements that trigger specific actions when clicked. In HTML forms, the element by default has type="submit", which submits the form data to the server. Custom buttons enhance user experience by providing styled, functional controls with personalized appearance and behavior. HTML forms support different HTTP methods − GET appends form data to the URL (visible and less secure), while POST sends data in the request body (hidden and more secure). For sensitive information like user credentials, always use the POST method. Syntax Following is the basic syntax for creating an HTML form − ...
Read MoreHow to Create Time-Table Schedule using HTML?
A timetable is an essential tool for organizing daily activities and improving productivity. In this article, you will learn how to create a simple and effective weekly timetable using HTML. This timetable will include time slots, subjects, and lunch breaks, along with highlighting weekends as holidays. HTML Tags used to Create Time-Table The main tag used for creating a table is the tag in HTML. Tables allow us to represent structured data in rows and columns, which makes them perfect for displaying time schedules. List of tags required to create a time-table − ...
Read MoreHTML DOM Input Text type Property
The HTML DOM Input Text type property is used to get or set the type attribute of an input text element. This property allows you to dynamically change the input type using JavaScript, which can be useful for creating adaptive forms or validating user input. Syntax Following is the syntax for returning the type value − inputTextObject.type Following is the syntax for setting the type value − inputTextObject.type = stringValue Parameters The stringValue parameter can be any valid HTML input type. Here are the common string values − ...
Read MoreHTML DOM Input Time autofocus Property
The HTML DOM Input Time autofocus property sets or returns whether a time input field should automatically get focus when the page loads. When set to true, the time input will be focused immediately upon page load, allowing users to start typing without clicking on the field first. Syntax Following is the syntax for getting the autofocus property value − inputTimeObject.autofocus Following is the syntax for setting the autofocus property − inputTimeObject.autofocus = booleanValue Return Value The autofocus property returns a boolean value indicating whether the time input has ...
Read MoreHTML DOM Input Time defaultValue Property
The HTML DOM Input Time defaultValue property sets or returns the default value of a time input field. This property represents the initial value specified in the HTML value attribute, which remains constant even when the user changes the input value. The key difference between value and defaultValue is that value changes as the user interacts with the input, while defaultValue always holds the original default value from the HTML markup. Syntax Following is the syntax for getting the default value − inputTimeObject.defaultValue Following is the syntax for setting the default value − ...
Read MoreHTML DOM Input Time disabled Property
The HTML DOM Input Time disabled property sets or returns whether a time input field is enabled or disabled. When an input time element is disabled, it becomes non-editable and appears grayed out, preventing user interaction. Syntax Following is the syntax for returning the disabled property − inputTimeObject.disabled Following is the syntax for setting the disabled property − inputTimeObject.disabled = booleanValue Parameters Here, booleanValue can be one of the following − Value Description true Disables the input time element (non-editable, grayed ...
Read MoreHTML DOM Input Time form Property
The HTML DOM Input Time form property returns a reference to the form element that contains the input time field. This property is read-only and provides access to the parent form object, allowing you to retrieve form attributes like ID, name, or other form-related properties. Syntax Following is the syntax for accessing the form property − inputTimeObject.form Return Value The form property returns a reference to the HTMLFormElement object that contains the input time element. If the input time element is not inside a form, it returns null. Example − Getting Form ...
Read More