- 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
![varma](https://www.tutorialspoint.com/assets/profiles/13568/profile/60_26300-1512638592.jpg)
4K+ Views
HTML 5 audio tags can be styled. By using the audio tag with “controls” attribute, the default browsers player is used. You can customize by not using the browsers controls. By removing the controls attribute, you can hide the built in browser user’s interface − Play Pause Vol+ Vol- You can also add CSS classes to each one of the elements and style them accordingly.
![Sreemaha](https://www.tutorialspoint.com/assets/profiles/13570/profile/60_64977-1512709068.jpg)
1K+ Views
The getitem(key) takes value for one parameter and returns the value associated with the key. The given key is present in the list associated with the object.if(localStorage.getItem("user")===null) { //... }But if the key is not present in the list then it passes null value by using the below-given codeYou can also follow the below-given procedure −if("user" in localStorage){ alert('yes'); } else { alert('no'); }
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
370 Views
Drawing text in a canvas with a typeface that is loaded via @font-face does not show text correctly at first. This is because the browser has not yet loaded the font from network. Therefore, it makes use of the font, which is already available.The font has to be completed loaded before it is used. This can be ensured using tag. If you want to make sure that the font is available and have some other elements preloaded, then you can do this by using the tag as under You can also load font like this −var newFont = ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
1K+ Views
All web browsers limit the canvas element’s width, height, and area.For Google Chrome, the maximum allowable width and height are 32,767 pixels and the maximum allowable area is 268,435,456 pixels.For Firefox, the maximum allowable width and height are 32,767 pixels and the maximum allowable area is 472,907,776 pixels. For IE, the maximum allowable width and height are 8,192 pixels. For IE Mobile, the maximum allowable width and height are 4,096 pixels.
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
417 Views
The allowsInlineMediaPlayback property of a UIWebView) enables/ disables in line media playback in the iOS web browser for a native app. By default, on iPhone this is set to NO, but on iPad its set to YES. Hence, the native video player takes over the screen, thus obstructing us from playing other dynamic content simultaneously with the video Adjust this behaviour in HTML as follows − iOS10+ In iOS 10+, Apple has now enabled the attribute playsinline in all the web browsers on iOS 10. Now, play around with this easily −
![seetha](https://www.tutorialspoint.com/assets/profiles/13549/profile/60_42938-1512640859.jpg)
9K+ Views
Add the following code snippet to image properties, and prevent images from being dragged and selected.img { user-drag: none; user-select: none; -moz-user-select: none; -webkit-user-drag: none; -webkit-user-select: none; -ms-user-select: none; }On double click on a text or image, it is highlighted (selected). The user select property can be used to prevent this. By setting this property to none, we can prevent our image from being selected (highlighted).ExampleYou can try to run the following code to prevent the image from being selected − img { -drag: none; user-select: none; -moz-user-select: none; -webkit-user-drag: none; -webkit-user-select: none; -ms-user-select: none; }
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
380 Views
The refresh button which was until now hidden in the flow menu, has been replaced by pull-down-to-refresh feature in chrome. However, some users do not need this feature in their application.body { // disables pull-to-refresh // allows overscroll glow effects overscroll-behavior-y: contain; }The overscroll behaviour property of CSS disables the pull to refresh action. In the above given code we have fixed double pull to refresh animation in the chatbox demo. The inbox blurs while the entire page is being refreshed.
![vanithasree](https://www.tutorialspoint.com/assets/profiles/13547/profile/60_85216-1512542720.jpg)
3K+ Views
The globalAlpha property returns the transparency value of drawing. The value 1.0 of this property specifies no transparency and the value 0.0 of this property specifies full transparency. Hence, by setting the globalAlpha property to 0.0, we can get a transparent canvas.ExampleYou can try to run the following code to make a transparent canvas − Your browser does not support the HTML5 canvas tag. var c = document.getElementById("idCanvas"); var ctx = c.getContext("2d"); ctx.fillStyle = "green"; ctx.fillRect(20, 20, 75, 50); ctx.globalAlpha = 0.0; ctx.fillStyle = "yellow"; ctx.fillRect(50, 50, 75, 50); ctx.fillStyle = "red"; ctx.fillRect(80, 80, 75, 50);
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
2K+ Views
The drawImage() method is used to draw image, canvas and videos on canvas. It can also draw part of image and increase or decrease the image size.ExampleLet us see an example −//context grabbed from your destination canvas ctx = destinationCanvas.getContext('2d'); //drawImage() called passing the source canvas directly dCtx.drawImage(sourceCanvas, 0, 0);In this code, firstly the image is copied from the source canvas. The sourceCanvas can be a HTMLImageElement, HTMLVideoElement, or a HTMLCanvasElement. A canvas drawing context cannot be used as a source. If a canvas drawing context is your source canvas then there is a reference to the original canvas ... Read More