Rishi Rathor has Published 155 Articles

How do we set text font in HTML?

Rishi Rathor

Rishi Rathor

Updated on 24-Jun-2020 08:53:26

2K+ Views

The tag was used to set the font in HTML, but it is now deprecated. Use CSS for the same purpose.ExampleYou can try to run the following code to change the font of text in HTML −           Tutorialspoint       Learning videos       Learning content    

How do we include the direction of text display in HTML?

Rishi Rathor

Rishi Rathor

Updated on 24-Jun-2020 07:36:47

123 Views

Use the dir attribute in HTML, to add the direction of the text.ExampleYou can try to run the following code to include the direction of text display in HTML −           This is demo text from left-to-right.       This is demo text from right-to-left.    

Define the number of columns in CSS Grid Layout

Rishi Rathor

Rishi Rathor

Updated on 24-Jun-2020 07:34:15

860 Views

Use the grid-template-columns property to define the number of columns in CSS Grid Layout.You can try to run the following code to set a number of columns. Here, 3 column grid is set:ExampleLive Demo                    .container {       ... Read More

CSS content-box Value

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 15:57:11

148 Views

Use the CSS background-origin property to set the content-box value. With the content-box value, the background image begins from the upper left corner of the content.You can try to run the following code to implement the content-box value:ExampleLive Demo                    #value1 ... Read More

Add arrow in tooltip with CSS

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 14:57:22

3K+ Views

With CSS, you can add a small arrow to the tooltip, using :after. With that, use the content property as well.You can try to run the following code to add an arrow in the tooltip:ExampleLive Demo           .mytooltip .mytext {          visibility: hidden; ... Read More

How to set height equal to the dynamic width (CSS fluid layout) in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 13:04:18

539 Views

To set height equal to the dynamic width in JavaScript, you can try to run the following code −Example                    .wrap {             width:400px;             height:300px;             border:2px solid yellow;          }          .myChild{             width: 80%;             border:1px solid red;          }                                  var res = $('.myChild').width();          $('.myChild').css({             'height': res + 'px'          });                                        

Set the month for a specified date according to universal time.

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 08:06:35

44 Views

JavaScript date setUTCMonth ( ) method sets the month for a specified date according to universal time.The following is the parameter of setUTCMonth ( monthvalue ) method in JavaScript −monthValue − An integer between 0 and 11, representing the month.ExampleYou can try to run the following code to set the month ... Read More

How to debug CSS/JavaScript hover issues?

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 06:59:35

235 Views

To debug CSS/JavaSript hover issues, you need to follow the below-given steps, Press F12 to open Inspect Element, in Firefox. In the DOM view right-click the element, and Select :hover, :active or :focus at the bottom of the context menuThe following screenshot shows how to debug hover issues −

How to catch all JavaScript unhandled exceptions?

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 06:34:11

608 Views

To catch all JavaScript unhandled exceptions, use window.error. The onerror event handler provides three pieces of information to identify the exact nature of the error −Error message − The same message that the browser would display for the given errorURL − The file in which the error occurredLine number− The line ... Read More

How to skip character in capture group in JavaScript Regexp?

Rishi Rathor

Rishi Rathor

Updated on 23-Jun-2020 05:07:57

664 Views

You cannot skip a character in a capture group. A match is always consecutive, even when it contains things like zero-width assertions.ExampleHowever, you can access the matched groups in a regular expression like the following code −                    var str = ... Read More

Advertisements