Found 2202 Articles for HTML

How to link a submit button to another webpage using HTML?

Sharon Christine
Updated on 15-Jun-2020 11:16:23

3K+ Views

Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.To link a submit button to another webpage, use the form action attribute. Add the link in the attribute, for example − ExampleYou can try to run the following code to link a submit button to another webpage −                    Student Name:                    Student Subject:                              

What is difference between

Swarali Sree
Updated on 15-Jun-2020 11:15:38

2K+ Views

In HTML, is used to create buttons in an HTML form. Inside the tag, you can place content like text or images. But, this is not the case with the buttons created with tag.Let’s see an example of button and ,HTML tagIt is used for creating a button within an HTML form and inside the tag, you can place content like text or images.The following will add an image to a button −ExampleYou can try to run the following code to add an image to a button using the tag −     ... Read More

How to Create a Multi-line Text Input (Text Area) In HTML?

Samual Sam
Updated on 02-Sep-2023 13:59:12

53K+ Views

To create a multi-line text input, use the HTML tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows.Here are the attributes of tag −AttributeValueDescriptionautofocusautofocusSpecifies that on page load the text area should automatically get focus.ColsnumberSpecifies the width of the textarea based on the number of visible character widths.DisableddisabledSpecifies the width of the textarea based on the number of visible character widths.formform_idSpecifies one or more forms.maxlengthnumberSpecifies the maximum number of characters in textarea.NametextAssigns a name to the ... Read More

How to use a textarea (a multi-line text input field) in HTML?

Sai Subramanyam
Updated on 14-May-2020 07:39:04

7K+ Views

To add a multi-line text input, use the HTML tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows.Here are the attributes of tag −AttributeValueDescriptionautofocusautofocusSpecifies that on page load the text area should automatically get focus.ColsnumberSpecifies the width of the textarea based on the number of visible character widthsDisableddisabledSpecifies the width of the textarea based on the number of visible character widths.formform_idSpecifies one or more forms.maxlengthnumberSpecifies the maximum number of characters in textarea.NametextAssigns a name to the ... Read More

How to add video in HTML page?

Jennifer Nicholas
Updated on 16-Jun-2020 06:54:18

3K+ Views

To add a video in an HTML page, use the element. It specifies a standard way to embed a video in HTML. Just keep in mind to add height and width to the video. Use the source element to add the source of the video, with the src attribute and the type of video with the type attribute.The HTML tag also supports the following additional attributes −AttributeValueDescriptionheightpixelsSpecifies the height.srcURLSpecifies the address of the source file.typeMIME_typeSpecifies the MIME type.widthpixelsSpecifies the width.

How to draw an SVG file on an HTML5 canvas?

Vrundesha Joshi
Updated on 16-Dec-2021 10:23:29

14K+ Views

To draw SVG onto canvas, you need to use SVG image. Firstly, use the element which contains the HTML. After that, you need to draw the SVG image into the canvas.ExampleYou can try the following code to draw an SVG file on an HTML canvas           SVG file on HTML Canvas                              var canvas = document.getElementById('myCanvas');          var ctx = canvas.getContext('2d');          var data = '' +           ... Read More

How to draw SVG Logo in HTML5?

Yaswanth Varma
Updated on 16-Dec-2022 10:41:05

2K+ Views

In the following article we are going to learn how to draw an SVG logo in HTML5. Before we jump into the article, let's discuss a few things about SVG. The image format known as Scalable Vector Graphics (SVG) uses vector data. Unlike other formats, SVGs do not use unique pixels to construct your image. It makes use of vector data instead. The best thing of using it was Making pictures that scale to any resolution is possible with SVGs, which makes them ideal for web design among many other applications. Let’s look into the simple example for understanding of ... Read More

How to draw a star by using canvas HTML5?

Nancy Den
Updated on 16-Dec-2021 09:52:08

6K+ Views

Drawing on the HTML canvas is to be done with JavaScript. Use the HTML DOM Method getElementById() and getContext() before drawing on the canvas. To draw a star in HTML, use the canvas element.With canvas, use the lineTo() method to draw a star. The lineTo() method includes x and y parameter values, which positions the lines to help you in drawing.To draw canvas on HTML document:ExampleYou can try to run the following code to draw a star using HTML5 canvas           HTML5 Canvas Tag                   ... Read More

How to draw shapes using SVG in HTML5?

Daniol Thomas
Updated on 16-Dec-2021 08:48:41

2K+ Views

SVG stands for Scalable Vector Graphics and is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer. Most of the web browsers can display SVG just like they can display PNG, GIF, and JPG.You can draw shapes like circle, rectangle, line, etc using SVG in HTML5 easily. Let’s see an example to draw a rectangle using SVG.ExampleYou can try to run the following code to draw a rectangle in HTML5. The element will be used                    #svgelem { ... Read More

How to draw a rounded Rectangle on HTML Canvas?

Krantik Chavan
Updated on 16-Dec-2021 09:57:01

3K+ Views

To draw a rectangle in HTML, use the canvas element. With canvas, use the rect() method to draw a rectangle. But, for creating a rounded rectangle, using the rect() method won’t work. We will be using the lineTo() and quadraticCurveTo() method to create a rounded rectangle.This is how you can create a canvas in HTML5 −You can learn how to create a rounded rectangle in canvasExample           HTML5 Canvas Tag                              var canvas = document.getElementById('newCanvas');         ... Read More

Advertisements