Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Front End Scripts Articles
Page 35 of 47
How to display rupee symbol in HTML
The Indian rupee symbol (₹) can be displayed in HTML using several methods. Here are the most reliable approaches to ensure proper display across different browsers. Using HTML Entity Code The most straightforward method is using the HTML entity code for the rupee symbol: Rupee Symbol Example Price: ₹500 Amount: ₹1000 Price: ₹500 Amount: ₹1000 Using Font Awesome Icons Font Awesome provides a reliable cross-browser solution with the rupee icon: ...
Read MoreComposition attribute in HTML5 Canvas?
HTML5 Canvas provides the globalCompositeOperation property that controls how new shapes are drawn on top of existing shapes. This property determines the compositing behavior when overlapping occurs. Syntax context.globalCompositeOperation = "composite-operation"; Available Composite Operations The globalCompositeOperation property accepts several values that define different blending modes: source-over (default): New shapes are drawn on top source-in: New shapes are drawn only where they overlap existing content source-out: New shapes are drawn only where they don't overlap destination-over: New shapes are drawn behind existing content lighter: Colors are added together for brighter results copy: Only ...
Read MoreHow to draw large font on HTML5 Canvas?
To draw large font text on HTML5 Canvas, you need to set the font size using the font property and use fillText() or strokeText() methods to render the text. Basic Syntax context.font = "size family"; context.fillText(text, x, y); context.strokeText(text, x, y); Example: Drawing Large Text Large Font Canvas var myCanvas = document.getElementById("myCanvas"); var ...
Read MoreWorking with tag in HTML5
The tag in HTML5 SVG allows you to create multi-sided shapes by defining a series of connected straight lines. It's perfect for creating geometric shapes like triangles, stars, and other polygonal figures. Syntax Key Attributes The points attribute defines the polygon's vertices as coordinate pairs (x, y), separated by spaces or commas. Other common attributes include fill, stroke, and stroke-width. Example: Creating an SVG Star ...
Read MoreBackward compatibility with HTML5
HTML5 is designed to be backward compatible with existing web browsers. New features build on existing features and allow you to provide fallback content for older browsers. Modern browsers like Safari, Chrome, Firefox, and Opera support many HTML5 features. Even older versions of Internet Explorer have partial support, while mobile browsers on iPhones, iPads, and Android phones provide excellent HTML5 compatibility. Feature Detection with JavaScript Instead of browser detection, use feature detection to check if specific HTML5 features are supported: // Check for Canvas support if (document.createElement('canvas').getContext) { console.log('Canvas is ...
Read MoreIs their a cross-origin attribute in HTML5?
Yes, HTML5 includes the crossorigin attribute. According to the official specification, it's defined as: The crossorigin attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas. Syntax Supported Values The crossorigin attribute accepts two values: Value Description Credentials Sent? anonymous Performs CORS request without credentials No use-credentials Performs CORS request with credentials Yes Example: Canvas Image Access ...
Read MoreWhat is the usage of and elements? Why they were introduced?
The HTML5 and elements are semantic tags that provide meaningful structure to web content. They improve accessibility for screen readers and help visually impaired users navigate content more effectively. These elements are also beneficial for eBook readers and search engines. The Element The element represents a thematic grouping of content, typically with its own heading. It's used to divide content into distinct sections within a document. Syntax Section Title Section content goes here... Example ...
Read MoreAdding HTML5 Validation to Visual Studio
Visual Studio 2012 and later versions include built-in IntelliSense and validation support for HTML5. Visual Studio 2010 had basic IntelliSense support for HTML5, but VS 2012 added corresponding code snippets, making it faster and easier to write HTML5 markup. Enabling HTML5 Validation in Visual Studio Follow these steps to enable HTML5 validation: Launch Visual Studio 2012 (or later). Go to Tools > Options from the menu bar. In the Options dialog, navigate to Text Editor > HTML > Validation. In ...
Read MoreTop frameworks for HTML5 based mobile development
The following are some of the top frameworks for HTML5 based mobile development, each offering unique advantages for creating cross-platform mobile applications: Kendo UI Kendo UI provides a comprehensive suite of HTML5 UI widgets and tools for building cross-platform mobile applications. It offers native-like performance and appearance across different devices and operating systems. // Basic Kendo UI Mobile App initialization var app = new kendo.mobile.Application(document.body, { transition: 'slide', layout: 'tabstrip-layout' }); Bootstrap Bootstrap is a responsive front-end framework that supports HTML, CSS, and JavaScript for ...
Read MoreCreate a text inside circles in HTML5 Canvas
To create text inside circles in HTML5 Canvas, you need to draw a circle first using context.arc(), then add text at the center using context.fillText(). This technique is useful for creating badges, labels, or interactive elements. Basic Approach The process involves three main steps: Draw a circle using beginPath() and arc() Fill the circle with a background color Add centered text with contrasting color Example: Static Circle with Text var canvas = document.getElementById('canvas1'); var context = canvas.getContext('2d'); // Draw circle context.beginPath(); context.fillStyle = "blue"; context.arc(100, 100, 30, 0, ...
Read More