- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2416 Articles for HTML
![Jennifer Nicholas](https://www.tutorialspoint.com/assets/profiles/13569/profile/60_88876-1512715262.jpg)
105 Views
Use the throw statement to raise your built-in exceptions or your customized exceptions. Later these exceptions can be captured and you can take appropriate action.ExampleYou can try to run the following code to implement throw statement − Click the following to see the result:
![Rishi Rathor](https://www.tutorialspoint.com/assets/profiles/13563/profile/60_89283-1512714754.jpg)
1K+ Views
setTimeout() function setTimeout( function, duration) − This function calls function after duration milliseconds from now. This goes for one execution. Let’s see an example − It waits for 2000 milliseconds, and then runs the callback function alert(‘Hello’) − setTimeout(function() { alert('Hello');}, 2000); setInterval() function setInterval(function, duration) − This function calls function after every duration milliseconds. This goes for unlimited times. Let’s see an example − It triggers the alert(‘Hello’) after every 2000 milliseconds, not only once. setInterval(function() { alert('Hello');}, 2000);
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
100 Views
can use several Navigator related properties in your Web page. The following are the properties −Sr.NoProperty & Description1appCodeNameThis property is a string that contains the code name of the browser, Netscape for Netscape and Microsoft Internet Explorer for Internet Explorer.2appVersionThis property is a string that contains the version of the browser as well as other useful information such as its language and compatibility.3languageThis property contains the two-letter abbreviation for the language that is used by the browser. Netscape only.4mimTypes[]This property is an array that contains all MIME types supported by the client. Netscape only.5platform[]This property is a string that contains ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
120 Views
To add debugging code to JavaScript, use the alert() or document.write() methods in your program. For example,var debugging = true; var whichImage = "widget"; if( debugging ) alert( "Calls swapImage() with argument: " + whichImage ); var swapStatus = swapImage( whichImage ); if( debugging ) alert( "Exits swapImage() with swapStatus=" + swapStatus );Examine the content and order of the alert() as they appear, you can examine the health of your program very easily.
![Ramu Prasad](https://www.tutorialspoint.com/assets/profiles/13539/profile/60_87996-1512650215.jpg)
143 Views
To reduce the number of errors in scripts, follow the below-given tips −Use plenty of comments. Comments enable you to explain why you wrote the script the way you did and to explain particularly difficult sections of code.Always use indentation to make your code easy to read. Indenting statements also make it easier for you to match up the beginning and ending tags, curly braces, and other HTML and script elements.Write modular code. Whenever possible, group your statements into functions. Functions let you group related statements, and test and reuse portions of code with minimal effort.Be consistent in the way you ... Read More
![Priya Pallavi](https://www.tutorialspoint.com/assets/profiles/13562/profile/60_91320-1512544134.jpg)
479 Views
A Document object represents the HTML document that is displayed in that window. The Document object has various properties that refer to other objects, which allow access to and modification of document content.The way a document content is accessed and modified is called the Document Object Model, or DOM. The Objects are organized in a hierarchy. This hierarchical structure applies to the organization of objects in a Web document.Window object − Top of the hierarchy. It is the utmost element of the object hierarchy.Document object − Each HTML document that gets loaded into a window becomes a document object. The document ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
355 Views
GoJS is a JavaScript library, which you can use to implement interactive diagrams. This page will show you the essentials of using GoJS. If you want to add diagrams and graphs, then use this library, which is Open Source.GoJS has a model-view architecture, in which Models holds arrays of JavaScript objects, which describe nodes and links. To visualize this data using actual Node and Link objects, the Diagrams act as views.Constructing a Diagram with GoJS creates an HTML5 Canvas element to be placed inside the given DIV element.How to draw a diagramStart working with GoJS, you need to declare the ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
181 Views
HTML5 localStorage saves string data in the browser and lasts beyond the current session. localStorage stores the data, with no expiration, whereas sessionStorage is limited to the session only. When the browser is closed, the session is lost.The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.You can try to run the following code to learn how to work with HTML5 localStorageExampleLive Demo ... Read More
![Yaswanth Varma](https://www.tutorialspoint.com/assets/profiles/511236/profile/60_1602256-1662106429.jpg)
769 Views
Using scripting, the canvas element is utilised to create graphics instantly (usually JavaScript). This tag is just introduced in HTML5. The element serves only as a holding area for images. To draw the visuals, you must utilise a script. There are numerous ways to draw pathways, boxes, circles, characters, and add images on a canvas. Syntax Here is the simple HTML example to depict the usage of canvas − DOCTYPE html> var c=document.getElementById("myCanvas"); var ... Read More