Category "html"

How I could use template literals in javascript in a variable name?

I want to declare a variable name via template literals How it is possible ? let z = 3; let test`${z}` = "hello"; //or = new obj() for example console.log

How to make new line input message by pressing shift + enter? Angular

I have a chat box with a single input field. I want to make handle new line input like Facebook's chatbox. My Chat Box: [1]: https://i.stack.imgur.com/NeG7d.png

string variable as URL to an anchor tag in a JSP

Is it possible to pass a string variable as URL to an anchor tag in a JSP which should get redirected to an external website? I am manipulating the the URL Stri

Issue with CSS file in Django

Trying to load a css file into my base.html file. When I load the webpage, it is not updating the webpage with the css styling I loaded. Everything is running a

Color the cell of a table depending on the value using javascript

I am trying to color cells of an HTML table (which is automatically generated by Python and Django) depending on cells' content. Here is my table. I would like

What does the fieldset form attribute really do?

I am not sure what the meaning of the fieldset form attribute is. MDN says: This attribute takes the value of the id attribute of a <form> element you wa

Hyperlink to web page with frame and specify frame content from hyperlink

Apologies if this has been answered. I can’t find a simple answer. All pages I am referring to are mine on my website. Put simply I have a page A.html in

Build rows before columns with grid

I have a grid with a variable number of elements, but it should always have 3 columns: <div class="grid grid-cols-3"> <span>1</span> <s

Active nav item with custom html elements

I'm building a nav component using html custom elements like so: HTML <app-navbar></app-navbar> <template> <style> ul { disp

How to animate a svg path such that another different colored path slowly starts filling it?

I have an SVG that kind of looks like a race track encoded in the form of a <path> element. What i want is to animate another path with a different color

How do HTML DOM properties works?

Is document.InnerText a variable? If not then why it has assignment operator like this code below: document.InnerText=count I tried to reverse the count and do

Valid CSS alternative to scroll-snap-points

Since the CSS properties scroll-snap-points-x and scroll-snap-points-y are deprecated, I was wondering if there still is a non-js solution for scroll snapping t

Working Bootstrap/Chart.JS/JavaScript - make size of graphs proportionate to screen

I'm trying to learn to work with Bootstrap, Chart.JS, and JavaScript in general. I've been able to work off a template, however every graph on my .html file is

How do you read CSS rule values with JavaScript?

I would like to return a string with all of the contents of a CSS rule, like the format you'd see in an inline style. I'd like to be able to do this without kno

How to autoplay YouTube video with sound enabled using YouTube IFrame Api

The title says it all: How to autoplay YouTube video with sound enabled using YouTube IFrame Api How can I do this with the YouTube IFrame Api?

Googlelabs dark mode toggle

I downloaded the source to use google dark toggle but it gives the errors seen below. When I use cdn it is ok but it does not work on localhost source. I do not

Django __init__() got an unexpected keyword argument 'user'

Im trying to build a password reset system using the default django libraries. The problem is after trying to enter the site which is for changing it (PasswordC

Bar Between two points in a container

I have a container (CardContainer) that has a few child elements (snippet below) and I would like to build a bar that I can fill in between the two points (the

How to save PDF from HTML with the same rendering in app script

I need to save an HTML webpage as a pdf in my google Drive. I am using app script. However, the PDF is rendered differently from the HTLM page. I need the PDF t

Is it possible to use CSS drop caps with shape-outside?

I'm trying to add a drop cap (currently just using float:left) to a paragraph of text that is wrapped into to a 100% width div with a shape-outside: polygon. Bu