Monica Mona has Published 112 Answers

Describe JavaScript Break, Continue and Label Statements

Monica Mona
Published on 23-Jan-2018 09:19:44
break statementThe break statement is used to exit a loop early, breaking out of the enclosing curly braces. The break statement exits out of a loop.Let’s see an example of break statement in JavaScript. The following example illustrates the use of a break statement with a while loop. Notice how ... Read More

How can I use a label with break statement in JavaScript?

Monica Mona
Published on 23-Jan-2018 07:22:45
Starting from JavaScript 1.2, a label can be used with break statement to control the flow more precisely. A label is simply an identifier followed by a colon (:) that is applied to a statement or a block of code.ExampleYou can try to run the following code to learn how ... Read More

How is JavaScript an interpreted language?

Monica Mona
Published on 23-Jan-2018 06:52:47
JavaScript is is a lightweight and interpreted language, therefore inside the context of a web browser, you don't even need to buy a compiler. You can start with a simple text editor such as Notepad.To make our life simpler, various vendors have come up with very nice JavaScript editing tools. ... Read More

How to draw a rectangle in HTML5 SVG?

Monica Mona
Published on 22-Jan-2018 10:22:44
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.To draw a rectangle in HTML ... Read More

How to draw a linear gradient in HTML5?

Monica Mona
Published on 22-Jan-2018 06:38:02
This method returns a CanvasGradient object that represents a linear gradient that paints along the line given by the coordinates represented by the arguments. The four arguments represent the starting point (x1, y1) and end point (x2, y2) of the gradient.createLinearGradient(x0, y0, x1, y1)Here are the parameter values of the ... Read More

How to use telephone input type in HTML?

Monica Mona
Published on 19-Jan-2018 13:04:23
The telephone input type is used in HTML using the <input type="tel">. Using this, allow the users to add telephone number.Note − The input type tel is only supported in Safari.ExampleYou can try to run the following code to learn how to use input type tel to allow user input ... Read More

How to limit an HTML input box so that it only accepts numeric input?

Monica Mona
Published on 19-Jan-2018 12:19:59
To limit an HTML input box to accept numeric input, use the <input type="number">. With this, you will get a numeric input field.After limiting the input box to number, if a user enters text and press submit button, then the following can be seen “Please enter a number.”ExampleYou can try ... Read More

How to mark abbreviation or acronyms in HTML?

Monica Mona
Published on 18-Jan-2018 06:43:44
To add abbreviation or acronym in HTML, use the <abbr> tag. Both abbreviation and acronym are the shortened versions and are represented as a series of letters. Some of the examples include, "Mr.", "MRP", "GMT", “NASA”, etc.ExampleYou can try to run the following code to mark abbreviation or acronyms in ... Read More

How to underline a text in HTML?

Monica Mona
Published on 18-Jan-2018 05:58:18
To underline a text in HTML, use the <u> tag. The <u> tag deprecated in HTML, but then re-introduced in HTML5. Now it represents a text different from another text stylistically, such as a misspelled word.To underline a text, you can also use the style attribute. The style attribute specifies ... Read More

How to make text bold in HTML?

Monica Mona
Published on 17-Jan-2018 12:37:52
To make text bold in HTML, use the <b>…</b> tag or <strong>…</strong> tag. Both the tags have the same functioning, but <strong> tag adds semantic strong importance to the text. The <b> tag is a physical markup element, but do not add semantic importance.Just keep in mind that you can ... Read More
Previous 1 ... 4 5 6 7 8 9 10 ... 12 Next
Advertisements