In this article we are going to learn about how to add an article in HTML5. One of the new sectioning elements in HTML5 is the tag. An article is represented in HTML using the tag. More specifically, the content contained in the element is distinct from the rest of the site's content (even though it can be related). Let’s consider the following examples to know how to add an article in HTML5 Example 1 In the following examples we are using inline styling in an article element. ... Read More
Videos can be easily from YouTube to your web page. You need to just embed the videos. At first, get the Video id − Step1: Go to the Video and right click on it. Select “Stats for nerds” − On clicking, you will get the following dialog box displaying the stats − Above you can see the video id is F6m0ghjadlw. Now, we will embed the same video using its id − Example Learn WordPress WordPress Installation Following is the video demonstrating how to install WordPress on localhost ... Read More
In this article we are going to learn how to wrap a text in tag in HTML. The HTML tag is used to present preformatted block of text. Preformatted text refers to text that has already been formatted and should not be formatted further. The tag also takes a closing tag () like lot of other HTML elements. Syntax Following is the basic syntax for tag. Enter text here… When you present a text in the webpage via tag, it is shown in the format you wrote it ... Read More
To draw HTML Image Elements on a canvas element, use the drawImage() method. This method defines an Image variable with src = "mySVG.svg", and use drawImage on load. var myImg = new Image(); myImg.onload = function() { ctx.drawImage(myImg, 0, 0); } img.src = "http://www.example.com/files/sample.svg ";
To create a linear gradient that looks like rainbow color, you can try to run the following code - Example #demo { height: 100px; background: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet); } Linear Gradient Rainbow
Inline Frame is known as iframe in HTML. The tag designates a rectangular area within the content where a different document, complete with scroll bars and borders, may be displayed by the browser. To embed another document inside the current HTML document, use an inline frame. An element's reference can be specified using the HTML iframe name property. In JavaScript, a reference to an element is also made using the name attribute. Iframes are essentially used to display a webpage inside the one that is now shown. The URL of the document that contains the iframe is specified ... Read More
The delete() function of the Set object accepts a value and removes it from the current Set object. Syntax Its Syntax is as follows setObj.delete() Example JavaScript Example const setObj = new Set(); setObj.add('Java'); setObj.add('JavaFX'); setObj.add('JavaScript'); setObj.add('HBase'); document.write("Contents of the Set before deletion:"); document.write(""); for (let item of setObj) { document.write(item); document.write(""); } ... Read More
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);
An ordered list is a numbered list of items. It gives you the ability to control the sequence number in the context. Allow us to group a set of related items in lists. HTML support ordered list, unordered list and we have to use the tag, to create ordered list in HTML. The tag defines the ordered list. We use tag to start list of items. The list of items can be marked as numbers, lowercase letters uppercase letters, roman letters, etc. The default order is numbers for list items in the context. The tag ... Read More
To return a random number between 1 and 200, use the JavaScript's Math.random() and Math.floor() method. Example You can try to run the following code to return a random number in JavaScript. document.write(Math.floor(Math.random() * 200) + 1);
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP