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
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to use sockets in JavaScriptHTML?
To enable bidirectional communication between web applications and server-side processes, JavaScript provides the WebSocket API. Unlike traditional HTTP requests, WebSockets maintain a persistent connection allowing real-time data exchange in both directions. WebSockets are commonly used for chat applications, live notifications, real-time gaming, stock price updates, and collaborative editing tools where instant communication is essential. Syntax Following is the syntax to create a WebSocket connection − const socket = new WebSocket(url [, protocols]); Where url is the WebSocket server URL (starting with ws:// or wss://) and protocols is an optional string or array of ...
Read MoreSet the coordinates of the area in an image map in HTML?
To set the coordinates of the area in an image map, use the coords attribute in HTML. The coords attribute defines the clickable areas within an image map by specifying precise coordinates that correspond to different shapes like rectangles, circles, and polygons. Syntax Following is the syntax for the coords attribute − The coordinate values depend on the shape type specified in the shape attribute. Coordinate Values by Shape The coords attribute accepts different coordinate formats based on the shape − Rectangle (rect) − coords="x1, y1, x2, y2" where ...
Read MoreHTML DOM Input Email name Property
The HTML DOM Input Email name property returns or sets the value of the name attribute of an email input element. This property is commonly used for form data identification and JavaScript manipulation. Syntax Following is the syntax for getting the name property − inputEmailObject.name Following is the syntax for setting the name property − inputEmailObject.name = 'string' Parameters string − A string value that specifies the name of the email input element. Return Value The property returns a string representing the current ...
Read MoreHow to create an unordered list with circle bullets in HTML?
An unordered list displays a collection of items marked with bullets such as circles, discs, or squares. The tag creates the list container, while tags define individual list items. By default, unordered lists use solid disc bullets, but you can customize the bullet style using CSS. To create circle bullets specifically, you use the CSS list-style-type property with the value circle. This property can be applied either inline with the style attribute or through external CSS stylesheets. Syntax Following is the syntax to create an unordered list with circle bullets − ...
Read MoreHow to include the audio/video controls in HTML?
The controls attribute in HTML provides built-in playback controls for audio and video elements. When added to or tags, it displays a control bar with play/pause buttons, volume controls, progress bar, and other standard media controls that users expect. Syntax Following is the syntax for the controls attribute − The controls attribute is a boolean attribute, meaning it does not require a value. Its presence enables the controls, while its absence disables them. Video Controls The controls ...
Read MoreHTML DOM Input Email Object
The HTML DOM Input Email Object represents an HTML element with type="email". This object provides properties and methods to interact with email input fields through JavaScript, allowing you to get, set, and manipulate email field attributes and values dynamically. Creating an Input Email Object You can create an Input Email Object in two ways − Using document.createElement() Following is the syntax to create an email input element dynamically − var emailObject = document.createElement("input"); emailObject.type = "email"; Using getElementById() Following is the syntax to access an existing email input element − ...
Read MoreHow to create an unordered list with square bullets in HTML?
An unordered list in HTML displays items without numbering, using bullet markers instead. By default, unordered lists use circular bullets, but you can customize the bullet style using the list-style-type CSS property to create square bullets, circles, or remove bullets entirely. HTML provides four main bullet types for unordered lists − disc − Creates circular bullets (default style) circle − Creates hollow circular bullets square − Creates solid square bullets none − Removes all bullet markers HTML List Bullet Types ...
Read MoreExecute a script when the user writes something in a search field in HTML?
The onsearch attribute in HTML allows you to execute a JavaScript function when the user performs a search action in a search input field. This event triggers when the user presses ENTER or clicks the clear button (×) in browsers that support it. Syntax Following is the syntax for the onsearch attribute − The onsearch attribute calls a JavaScript function when a search event occurs on the search input field. Example − Basic Search Event Following example demonstrates how to use the onsearch attribute to capture search input − ...
Read MoreHTML DOM Input Email pattern Property
The HTML DOM Input Email pattern property is used to set or return the value of the pattern attribute of an email input field. This property defines a regular expression that the email input value is checked against during form validation. Syntax Following is the syntax for getting the pattern value − inputEmailObject.pattern Following is the syntax for setting the pattern value − inputEmailObject.pattern = "RegExp" Parameters The pattern property accepts the following parameter − RegExp − A string containing a regular expression that defines the valid ...
Read MoreHow to Create an Unordered List with Image Bullets in HTML?
An unordered list in HTML displays items without any numbering or ordering. It is created using the tag with individual list items defined using tags. By default, unordered lists use simple bullet points, but we can customize these bullets to use images for a more visually appealing design. HTML provides several built-in bullet styles for unordered lists − disc − Creates solid circular bullets (default style) circle − Creates hollow circular bullets square − Creates solid square bullets none − Removes all bullet markers Beyond ...
Read More