Smita Kapse

Smita Kapse

388 Articles Published

Articles by Smita Kapse

Page 3 of 39

What HTML5 tag should be used for filtering search results.

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 262 Views

HTML5 provides semantic elements for organizing content, but there's no specific tag exclusively for filtering search results. The best approach is to use a combination of semantic elements with appropriate roles and structure. Recommended Structure for Search Filters Use the element with filter controls inside a for better semantics and accessibility: Search Results Filter Results ...

Read More

With JavaScript RegExp search a hexadecimal number character.

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 463 Views

To find a hexadecimal number character with JavaScript Regular Expression, use the \x escape sequence followed by the two-digit hexadecimal value. Syntax \xdd Where dd represents the two-digit hexadecimal value (00-FF) of the character you want to match. Example: Searching for Hexadecimal Character The following example searches for hexadecimal number 53, which represents the character 'S': JavaScript Regular Expression ...

Read More

Difference between MessageChannel and WebSockets in HTML5

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 228 Views

WebSockets and MessageChannel are both HTML5 communication technologies, but they serve different purposes. WebSockets enable real-time communication between browser and server, while MessageChannel facilitates secure communication between different browsing contexts within the same application. WebSockets Overview WebSockets provide bidirectional communication between browser and server over a single persistent connection. They're ideal for real-time applications like chat systems, live updates, and gaming. // WebSocket connection to server const socket = new WebSocket('wss://example.com/socket'); socket.onopen = function(event) { console.log('WebSocket connected'); socket.send('Hello Server!'); }; socket.onmessage = function(event) { ...

Read More

How to turn a String into a JavaScript function call?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 575 Views

In JavaScript, you can dynamically call a function by converting a string containing the function name into an actual function call. This is useful when function names are determined at runtime. Using window Object (Browser) The most common method in browsers is using the window object to access globally defined functions: function myFunction(argument) { alert('My function ' + argument); } ...

Read More

What is the difference between break and continue statements in JavaScript?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 695 Views

JavaScript provides two important control statements for modifying loop execution: break and continue. While both affect loop flow, they serve different purposes. break Statement The break statement is used to exit a loop completely, terminating the entire loop execution and transferring control to the statement immediately following the loop. Example var x = 1; document.write("Entering the loop"); ...

Read More

Which one is better to use for a JavaScript link, "#" or "javascript:void(0)"?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 245 Views

When creating JavaScript links that don't navigate to another page, developers often choose between "#" and "javascript:void(0)". Both prevent default navigation, but they behave differently and have distinct use cases. Understanding the Difference The "#" anchor creates a link to the top of the current page and adds a hash to the URL, while "javascript:void(0)" executes JavaScript that returns undefined, preventing any navigation without affecting the URL. Using "#" Hash Links The hash symbol creates an anchor link that jumps to the top of the page if no element with that ID exists: ...

Read More

What is "function*" in JavaScript?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 343 Views

The function* declaration defines a generator function that returns a Generator object. Unlike regular functions, generators can pause execution with yield and resume later, making them powerful for controlling program flow and creating iterators. Syntax Generator functions can be declared with function* in three equivalent ways: function* myFunction() {} // or function *myFunction() {} // or function*myFunction() {} How Generator Functions Work When called, a generator function doesn't execute immediately. Instead, it returns a generator object with methods like next() to control execution step by step. Basic Example ...

Read More

How to position text to top left position on an image with CSS

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 1K+ Views

To position text to the top left position on an image, use the position property with absolute positioning along with the top and left properties. The parent container must have position: relative to serve as the positioning reference. Syntax .container { position: relative; } .text-overlay { position: absolute; top: value; left: value; } Example The following example demonstrates how to position text at the top left corner of an image − ...

Read More

Set how many columns an element should span across with CSS

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 219 Views

The CSS column-span property allows an element to span across multiple columns in a multi-column layout. This is particularly useful for creating headings or other elements that should break the column flow. Syntax selector { column-span: value; } Possible Values ValueDescription noneThe element does not span across columns (default) allThe element spans across all columns Example: Heading Spanning All Columns The following example demonstrates how to make a heading span across all columns in a multi-column layout − ...

Read More

Role of CSS flex-wrap property wrap-reverse value

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 244 Views

The CSS flex-wrap property with wrap-reverse value allows flex items to wrap to new lines in reverse order. When flex items exceed the container width, they wrap from bottom to top instead of the default top to bottom behavior. Syntax .container { display: flex; flex-wrap: wrap-reverse; } Example The following example demonstrates how wrap-reverse wraps flex items in reverse order − .mycontainer { display: flex; ...

Read More
Showing 21–30 of 388 articles
« Prev 1 2 3 4 5 39 Next »
Advertisements