Yaswanth Verma has Published 46 Answers

How to use drag and drop in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 14:45:37

Grabbing an object and moving it to a different position is made simpler with the drag and drop idea, which is very dynamic and user-friendly. This enables the user to click and drag an element to another position before letting go of the mouse button to drop it there. Drag ... Read More

How to draw a text with fillText() in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 13:49:25

The Canvas 2D API's CanvasRenderingContext2D method fillText() draws a text string at the given coordinates while filling the characters with the current fillStyle. On the canvas, filled text is drawn using the fillText() method. The text is black by default. Syntax Following is the syntax to fill text in HTML5 ... Read More

How to draw a circle with arc() in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 13:46:35

The arc() is a method of the canvas 2D API.The arc() method allows you to draw a circular arc. Syntax Following is the syntax to draw a circle with arc() in HTML5 arc(x, y, radius, startAngle, endAngle) arc(x, y, radius, startAngle, endAngle, counterclockwise) The arc() method generates a circular ... Read More

How to draw a text with strokeText() in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 13:44:07

The stroketext() method renders the provided text using the current font, linewidth, and strokestyle properties at the specified place. The path won't be affected by any subsequent fill() or stroke() calls because this method draws directly to the canvas without changing the original route. Syntax Following is the syntax for ... Read More

How to draw a line with lineTo() in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 13:41:07

The Canvas 2D API's lineTo() method, which connects the last point of the current sub-path to the given (x, y) coordinates, adds a straight line to the sub-path. The lineTo() method expands the canvas by adding a new point and drawing a line to it from the previous point (this ... Read More

How to use min and max attributes in HTML?

Yaswanth Verma

Yaswanth Verma

Updated on 12-Oct-2022 13:37:18

The min and max properties in HTML are used to specify the element's acceptable range of values. The max attribute sets the element's maximum value, whereas the min attribute sets the element's minimum value. For input restriction, the min and max attributes are used with the number ... Read More

How to create a rectangle with rounded corners in HTML5 SVG?

Yaswanth Verma

Yaswanth Verma

Updated on 04-Oct-2022 12:26:21

SVG is a mark-up language based on XML that is used to describe two-dimensional vector graphics. SVG is essentially what HTML is to text when it comes to visuals. A rectangle is drawn on the screen via the element. The placement and shape of the rectangles on the screen ... Read More

How to draw a linear gradient in HTML5?

Yaswanth Verma

Yaswanth Verma

Updated on 27-Sep-2022 13:24:07

Gradients are image data type CSS components that depict a change in colour between two or more hues. Gradients are most frequently used as background for elements. Gradients let you explore new possibilities for giving modern clean looks. A linear gradient is a color change that occurs by using the ... Read More

How to draw an ellipse in HTML5 SVG?

Yaswanth Verma

Yaswanth Verma

Updated on 27-Sep-2022 13:17:02

SVG is a markup language based on XML that is used to describe two-dimensional vector graphics.SVG is essentially what HTML is to text when it comes to visuals. The element in SVG is used to make ellipses. The cx and cy characteristics are used to centre the ellipse. Syntax ... Read More

How to draw a rectangle in HTML5 SVG?

Yaswanth Verma

Yaswanth Verma

Updated on 27-Sep-2022 13:12:55

SVG is a markup language based on XML that is used to describe two-dimensional vector graphics. SVG is essentially what HTML is to text when it comes to visuals. A rectangle is drawn on the screen via the element. The placement and shape of the rectangles on the screen ... Read More

Advertisements