web design

List of important custom and in-built AMP tags

amp-img amp-img is use as replacment of HTML img tag. amp-img tag effectively manage image resource at runtime. It uses lazy load to reduce page load time. To use amp-img need to specify width and height, src attriburtes. It also support three optional attributes srcset, alt, attribution. src – audio file url. autoplay – It …

List of important custom and in-built AMP tags Read More »

AMP (Accelerated Mobile Pages) Example Pages

AMP (Accelerated Mobile Pages) is a Google open source project to speed up page load in mobile devices. AMP consist of three main parts <!doctype html> <html amp lang=\”en\”> <head> <meta charset=\”utf-8\”> <script async src=\”https://cdn.ampproject.org/v0.js\”></script> <title>Hello, AMPs</title> <link rel=\”canonical\” href=\”http://example.ampproject.org/article-metadata.html\” /> <meta name=\”viewport\” content=\”width=device-width,minimum-scale=1,initial-scale=1\”> <script type=\”application/ld+json\”> { \”@context\”: \”http://schema.org\”, \”@type\”: \”NewsArticle\”, \”headline\”: \”Open-source framework for …

AMP (Accelerated Mobile Pages) Example Pages Read More »

Canvas Examples – Add Text | Add Image | Resize Image | Change Canvas Color

How to add text to Canvas? For add text we can do that using fillText(‘text’, x, y) or strokeText(“text”, x, y) method. The text is rendered using the current stroke or fill style, which can be a color, gradient, or pattern. You can specify a number of text settings, such as the font family, size, …

Canvas Examples – Add Text | Add Image | Resize Image | Change Canvas Color Read More »

Canvas Examples – Draw Line | Rectangle | Circle | Undo

What is Canvas? Canvas is an HTML5 element which can be used to draw graphics using scripting (usually JavaScript). We’ll need to place the canvas tag somewhere inside the HTML document, access the canvas tag with JavaScript, create a context, and then utilize the HTML5 Canvas API to draw visualizations. Canvas has several methods for …

Canvas Examples – Draw Line | Rectangle | Circle | Undo Read More »