Found 127 Articles for HTML5

HTML5 Canvas fit to window

Riya Kumari
Updated on 12-Oct-2022 14:29:12

9K+ Views

When you view a webpage containing canvas in different screens like that of mobile, pc, desktop or tablet, the size of the screen changes each time. So, it is necessary that the canvas resizes itself according to the screen for better user experience. In this article, we will learn how to resize an HTML5 canvas to fit the window. Let us first understand more about HTML5. HTML5 HTML (Hyper Text Markup Language) is a standard markup language for web pages. Using HTML, you can create your own website. HTML5 is the updated version of HTML with advanced technology used in ... Read More

Fractional font sizes for HTML5 Canvas?

Riya Kumari
Updated on 12-Oct-2022 13:24:15

573 Views

HTML5 canvas API enables the developers to write text on an HTML page in the different ways such as in a canvas. Different browsers provide various kinds of font sizes on the HTML5 canvas specially when the font sizes are floating numbers like 2.456 px, 3.4 px etc. So, how to apply fractional font size to a text in an HTML5 canvas? First, let’s see what HTML5 canvas is. What is a HTML5 Canvas? Basically, canvas is rectangular enclosed area in a web page. By default, it has no border and content. The canvas element of HTML5 enables the user ... Read More

How to handle errors in HTML5 Web Workers?

Riya Kumari
Updated on 12-Oct-2022 14:11:36

1K+ Views

Suppose you want the browser to do complex calculations on web page on clicking a word. This will take time. So, the web page will become unresponsive until the operation is completed. You need something which will do the required operation silently without affecting the user interface. So, how to solve this problem. In this article, we will discuss about how to solve such issues. The solution is Web workers. But what is a web worker? Let’s see. What is a Web Worker? A web worker is an object consisting of Javascript codes which runs behind the web page ... Read More

Crop Canvas / Export HTML5 Canvas with certain width and height

Riya Kumari
Updated on 12-Oct-2022 13:20:05

1K+ Views

HTML5 canvas allows the users to draw or create 2D graphics in any web page. Suppose you want to crop a part of the canvas created on the web page and export it to any other area of the web page, then you can do it using javascript. For example, you have an image in the canvas and you want to export a part of image of dimension 400px * 260px. In this article, we will learn how to execute the above using few javascript codes. To learn further, let us first considering understanding what HTML5 Canvas is What is ... Read More

Internet Explorer 8 will not modify HTML5 tags in print stylesheet

Riya Kumari
Updated on 12-Oct-2022 14:04:07

178 Views

While doing a print style sheet, you need various HTML5 tags like , , , etc., which are used for different layout options to your web page which is to be printed. Chrome, Firefox and Internet Explorer9 enables the users to use such HTML5 tags in their browsers. However, Internet Explorer 6-8, Safari 4x and other such older browsers does not support those tags due to which we can’t apply those layout options in the web page. So, how can we use those HTML5 tags in Internet Explorer 8? For this, you can use html5.shiv. First let’s understand about ... Read More

Can I play the same sound more than once at the same time with HTML5?

Riya Kumari
Updated on 12-Oct-2022 13:08:45

1K+ Views

Suppose you want to make a quiz app. In it, if you click the wrong option, an audio will be played in the background saying “wrong answer”. But if you click two or more options simultaneously which are wrong, you won’t be able to hear the sound as many times wrong answer is clicked at the same time. So, how to resolve this issue. In this article, you will see if you can play the same sound more than once at the same time with HTML5 or not. The answer is Yes!!! There are two methods for doing so. Let ... Read More

HTML5 date field and placeholder text in Safari

Riya Kumari
Updated on 13-Oct-2022 07:33:17

6K+ Views

If you want to add a date picker which includes the year, month and day, in your webpage, then HTML5 facilitates a “date” field for you. It is a type in element. It works well in various web browsers like Google chrome, Internet Explorer and Firefox. Here we are going to learn about how it works in Safari which is also a web browser. First let’s see about Safari. Safari Safari is a graphical web browser developed by Apple for its users. It is basically an open source software, specifically designed for all Apple devices. It runs on ... Read More

HTML5 input type range for vertical orientation possible in Firefox?

Riya Kumari
Updated on 13-Oct-2022 07:36:11

858 Views

In a thermometer, as the temperature increases, the mercury in it rises up too. Vice versa is the case for lowering the temperature. Similarly, if you want to create such effect on a webpage, it is done by the range type of input element in HTML5. This is known as range for vertical orientation. The most common use of the slider input is when we know the lower and higher margins. For instance, if we are developing a website that records the temperature of different places. You can have the temperatures as a sliding input range. It was possible to ... Read More

Several distinct caches for a single URL in HTML Cache?

Riya Kumari
Updated on 13-Oct-2022 08:11:22

243 Views

Content caching is an effective way for fast and smooth user experience. Every URL in a web page can be linked to a single cache manifest section. However, there are certain large and rarely used files which decreases the overall speed of the Cache. Since they do not need to be changed but still gets re-downloaded every time the Cache gets updated, it is better to have such files in different cache with same URL. This will increase its speed and performance. So, how to spilt HTML cache? Before that, let’s understand what an HTML cache is. What is an ... Read More

Is there a way to resize image with “nearest neighbour” resampling in HTML5?

Riya Kumari
Updated on 13-Oct-2022 08:08:26

1K+ Views

Resizing an image is one of the cumbersome tasks since it affects the performance of your website. In case of online photos, size is of great importance. Generally, users prefer small size images since it takes less time to load even with moderate internet connections. If the image is too big, your page may become unresponsive for some time. Web pages with uniformly sized images are attractive and appealing. Hence, it is essential to upload images of appropriate size to your website. Resizing VS Resampling Changing the size that is, height and width, of an image to be printed ... Read More

Advertisements