Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Thursday, November 23, 2023

How to Create Web Component

As of 2023, the support for web components, alternatively referred to as custom elements, across browsers is exceptionally robust. Now is an opportune moment to embark on the journey of crafting your personalized elements for the web.

Web components, synonymous with custom elements, represent novel HTML elements that you can personally construct. These elements encapsulate a combination of markup, style, and interactive features.

Within the confines of this article, you'll delve into the fundamentals of web components and embark on the creation of a straightforward web component designed to display the current date.

Example


Monday, October 9, 2023

Extract data from HTML table in an array using jQuery.

Individuals encounter challenges working with data in HTML when attempting to integrate it into their code. The following presents a straightforward method for extracting data from an HTML table and storing it in an array.

 

Friday, October 14, 2022

HTML Tags, which does not require CSS or JS


(1) The <details> tag is used to create an interactive widget that the user can open and close. By default, the widget is closed. When open, it expands and displays the content within. The <summary> tag is used in conjunction with <details> to specify the details of a visible heading. 

 Here is an example:-

Output

Loram Ipsumis simply dummied

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.








(2) Tag <picture>
The <picture> tag gives you flexibility in specifying image resources. This tag is used in responsive designs. As it allows you to use multiple images of different sizes to nicely fill the browser viewport, so you don’t need to use one image that is scaled up or down based on the viewport width.
The <picture> element contains two tags: one or more <source> tags and one <img> tag.

Here is an example

Output:

Resize the browser window to load different images.

Flowers







(3) Tag <template>
The <template> tag is a container to hold some HTML content hidden from the user. This hidden content can be displayed by Javascript.

Here is an example


The template Element

Click the button below to display the hidden content from the template element.

Monday, January 3, 2022

Export HTML table to Excel

Code that will export html table to excel

Monday, March 19, 2018

capitalize , lowercase, uppercase to HTML input Text

I have found number of JavaScript to convert text to upper while keypress. But the way we can use CSS is the best... capitalize , lowercase, uppercase

Css :
input.upper { text-transform: uppercase; } input.lower { text-transform: lowercase; } input.capital { text-transform: capitalize; }

Input Field Example.

UPPER CASE :
lower case :
Capital Case :