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
HTML Articles
Page 63 of 151
How to count the number of notifications on an icon?
Overview A notification icon is a common feature that exists in each and every application. In order to count the number of notifications and display it on an icon can be achieved with basic knowledge of JavaScript. So to build this feature we should have some prior knowledge about HTML Document Object Model (DOM), CSS, and Bootstrap. Approach To start building this feature first we had to link some of the Content Delivery Network (CDN) links to our HTML page. Font Awesome CDN Link − Bootstrap CDN Link − ...
Read MoreHow to drop fill color to change the image color using HTML and CSS?
In the world of web development, it's essential to have knowledge about the latest CSS and HTML techniques to add stunning visual effects to a website. One such effect is the "color drop effect, " which allows you to change the color of an image on hover by dropping a fill color on it. With this effect, you can make your website more interactive and engaging for the visitors. In this article, we will guide you through the process of creating a color drop effect using HTML and CSS. So, whether you are a beginner or an experienced web developer, ...
Read MoreHTML5 canvas ctx.fillText won\'t do line breaks
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
Read MoreWhat is the difference between novalidate and formnovalidate attributes?
The novalidate and formnovalidateattributes are used to bypass validation. The novalidate attribute is applied to a form and prevents it from validation. The formnovalidate is applied to input type submit button, which overrides the novalidate. It submits the form without validating. The novalidate attribute is also a Boolean attribute, but using it won’t validate the form of submission. The formnovalidate attribute in HTML is useful when you have a form with more than one submit button. HTML novalidate attribute The novalidate attribute in HTML is used to signify that the form won’t get validated on submit. It is a Boolean attribute ...
Read MoreHow elements float in HTML?
We can float elements with CSS float property to either the left or right of the containing parent element. Other elements are placed around the floated content. Multiple elements with same value of float property enabled are all placed adjacently. Float Left In this example, the image is placed on the left using the float property with the value left. To set the right margins properly, we have set it using the margin-right property − img { float: left; margin-right:20px; } Example Let us see an example to float elements to the left − ...
Read MoreHTML DOM Input Text object
The HTML DOM Input Text object is associated with the element with type “text”. We can create and access an input element with type text using the createElement() and getElementById() method respectively.PropertiesFollowing are the properties for the text object −PropertyDescriptionautocompleteTo set or return the autocomplete attribute value of a text fieldAutofocusTo set or return if the text field should automatically get focus when the page loads.defaultValueTo set or return the text field default value.DisabledTo set or return whether the text field is disabled, or not.FormTo return the reference of the form containing the text fieldmaxLengthTo set or return the ...
Read MoreUse HTML with jQuery to make a form
To make a form with HTML, we use the following − Details: Student Name Exam Date and Time To make a form with jQuery and HTML, add input type text as −$form.append('');A better example would be − $myform = $(""); $myform.append(''); $('body').append($myform);
Read MoreCreating a skewed background using CSS
A skewed background is a design effect that creates a diagonal or angled appearance on the background of a web page or element. This effect can be achieved using CSS transforms to skew the container element, along with other CSS properties like background-color, gradients, and images to create the desired visual effect. Approach -1: using the transform property in CSS Algorithm Set the title of the document as “Skewed Background”. Define CSS variables for the skew angle and background colors Set the transform property to skew the background using the CSS transform property Set a linear gradient background using ...
Read MoreUnescape HTML entities in JavaScript?
To unescape HTML entities in JavaScript, use the unescape() function. Let’s say you want to encode special character with the unescape() function − document.write(unescape("Demo%20Text%20")); In this article, we will see two examples − Unescape Entities Decode the Encoded String Unescape Entities Example Lo unescape, we will use the unescape() method in JavaScript. Let us see an example − DOCTYPE html> Demo Heading document.write(unescape("Demo%20Text%20")); Output Decode the Encoded String Use escape() for encoding ...
Read MoreHow can you set the height of an outer div to always be equal to a particular inner div?
In this article, we will set the left-most inner div to determine the height of the outer div. Consider the following two example − Set the height of an outer div to always be equal to a particular inner div using Flex Set the height of an outer div to always be equal to a particular inner div using CSS Grid Set the height of an outer div to always be equal to a particular inner div using Flex Example Let us see the example using Flex − ...
Read More