- 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 2418 Articles for HTML
![Giri Raju](https://www.tutorialspoint.com/assets/profiles/13536/profile/60_72105-1512540773.jpg)
980 Views
If you want a transparent background in three.js, you need a pass in the alpha parameter to the WebGLRenderer constructors in the below-given code − var renderer = new THREE.WebGLRenderer( {alpha: true } ); // You can leave the clear color at the defaultvalue. renderer.setClearColor( 0x000000, 0 ); //default However, to set the background color, renderer.setClearColor(0xb0f442 );
![mkotla](https://www.tutorialspoint.com/assets/profiles/13540/profile/60_41073-1512640012.jpg)
1K+ Views
Steps Follow the below-given steps to convert HTML5 into standalone Android App You need to first create an Android app using Eclipse. Move HTML code to /assets folder −The Assets provide a way to include arbitrary files such as text, XML, music, fonts, and video in your application. Load web view with the file − android_asset/ file enable javascript Layout for WebView While creating a layout for WebView − WebVieww = new WebView(this); w.loadUrl("http://www.app.com/");
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
9K+ Views
The HTML element is a container for SVG graphics. SVG stands for Scalable Vector Graphics. SVG and useful for defining graphics such as boxes, circles, text, etc. 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.The HTML element is used to draw graphics, via JavaScript. The element is a container for graphics.SVGHTML CanvasSVG has better scalability. So it can be printed with ... Read More
![radhakrishna](https://www.tutorialspoint.com/assets/profiles/13544/profile/60_40618-1512640354.jpg)
1K+ Views
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 ";
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
2K+ Views
Use the playbackRate property sets the current playback speed of the audio/video. With that, the defaultPlaybackRate property sets the default playback speed of the audio/video. Change the playing speed of videos You can try to run the following code to change the playing speed of videos − /* play video thrice as fast */ document.querySelector('video').defaultPlaybackRate = 3.0; document.querySelector('video').play(); Play video twice as fast The following is to play the video twice as fast − /* play video twice as fast */ document.querySelector('video').playbackRate = 2;
![Prabhas](https://www.tutorialspoint.com/assets/profiles/13554/profile/60_90506-1512543588.jpg)
213 Views
Use createReadStream to send the requested part to the client. The function call createReadStream() will give you a readable stream. ExampleThe following is the code −stream = fs.createReadStream(path); stream.on('open', function () { res.writeHead(206,{ "Content-Range":"bytes " + begin + "-" + end + "/" +total, "Accept-Ranges":"bytes", "Content-Length":chunksize, "Content-Type":"new/mp4" }); stream.pipe(res); });
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
947 Views
If you have a data url, you can create an image to a canvas. This can be done as shown in the following code snippet −var myImg = new Image; myImg.src = strDataURI;The drawImage() method draws an image, canvas, or video onto the canvas. The drawImage() method can also draw parts of an image, and/or increase/reduce the image size.The code given below is also appropriate with the sequence - create the image, set the onload to use the new image, and then set the src −// load image from data url Var Obj = new Image(); Obj.onload = function() { ... Read More
![varun](https://www.tutorialspoint.com/assets/profiles/13559/profile/60_29674-1512637943.jpg)
204 Views
h1 is a heading and not a title. Youcan gives own heading element to each sectioning element. h1 cannot be the title. It can be the heading of that particular section of the page. Each article can have its own title. defines the most important heading. The first element is considered the label for the entire document. It is perfectly fine to use as many tags as your document calls for; that is one per sectioning root or content section. Use one set of tags per sectioning root or content section. There should always be an ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
1K+ Views
The fillText() method draws filled text on the canvas. If you want to break lines you can do this by splitting the text at the new lines and calling the filltext() multiple times. By doing so, you are splitting the text into lines and drawing each line separately.You can try to run the following code snippet − var c = $('#c')[0].getContext('2d'); c.font = '12px Courier'; alert(c); var str = 'first line second line...'; var a = 30; var b = 30; var lineheight = 15; var lines = str.split(''); for (var j = 0; j
![usharani](https://www.tutorialspoint.com/assets/profiles/13564/profile/60_32161-1512638316.jpg)
142 Views
It is possible to change the textcolour depending on the average brightness of the covered pixels ofits parent's background color by using the following code snippet.var rgb = [255, 0, 0]; setInterval(display, 1000); function display() { rgb[0] = Math.round(Math.random() * 255); rgb[1] = Math.round(Math.random() * 255); rgb[2] = Math.round(Math.random() * 255); var d = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) / 1000); // for foregound var f = (d> 125) ? 'black' : 'white'; // for background var b = 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')'; $('#box').css('color', f); $('#box').css('background-color', b); } DemoThe following is the CSS −#box { width: 300px; height: 300px; }