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
Web Development Articles
Page 342 of 801
Usage of text-transform property in CSS
The text-transform property in CSS is used to control the capitalization of text content. It allows you to transform text to uppercase, lowercase, capitalize first letters, or leave it unchanged. Syntax text-transform: value; Property Values Value Description none No transformation (default) capitalize Capitalizes the first letter of each word uppercase Converts all text to uppercase lowercase Converts all text to lowercase Example Text Transform Example ...
Read MoreHow to print object array in JavaScript?
In this tutorial, we will learn how to print object arrays in JavaScript. An array of objects is a collection that stores multiple objects with similar structure in a single variable. Each object can contain multiple properties, making it useful for storing complex data like user information, product details, or any structured data. Let's explore different methods to print arrays of objects in JavaScript. Using JSON.stringify() Method The JSON.stringify() method converts JavaScript objects into JSON strings, making it perfect for displaying arrays of objects in a readable format. Syntax JSON.stringify(value, replacer, space) ...
Read MoreWhy in JavaScript, "if ('0' == false)" is equal to false whereas it gives true in "if(0)" statement?
JavaScript's comparison behavior can be confusing when mixing different data types. Let's examine why '0' == false returns true while if(0) evaluates to false. Understanding '0' == false When using the loose equality operator ==, JavaScript performs type coercion following specific rules: console.log('0' == false); // true console.log(typeof '0'); // "string" console.log(typeof false); // "boolean" true string boolean The comparison follows this rule: If Type(y) is Boolean, return the result of the comparison x == ToNumber(y) Here's what happens step by step: ...
Read MoreExample of embedded CSS
Embedded CSS allows you to place CSS rules directly within an HTML document using the element. This tag is placed inside the section, and the rules defined will apply to all elements in the document. Syntax /* CSS rules go here */ selector { property: value; } ...
Read MoreHow to print a triangle formed of '#' using JavaScript?
In this tutorial, we will learn to print a triangle formed of '#' using JavaScript. You need to use nested loops to print a triangle formed of '#' in JavaScript. The outer loop controls the number of rows, while the inner loop controls how many '#' symbols to print in each row. Nested loops are loops that contain another loop inside them. We'll explore two approaches using different types of loops in JavaScript: for loop while loop Using for Loop to Print a Triangle The for loop ...
Read MoreWorking with element for CSS
You can put your CSS rules into an HTML document using the element. This tag is placed inside ... tags. Rules defined using this syntax will be applied to all the elements available in the document. Syntax /* CSS rules go here */ selector { property: value; } Example Following is an example of embedded CSS ...
Read MoreHow exactly does work?
The defer attribute tells the browser to download the script while parsing HTML but delay execution until the DOM is fully built. It only works with external scripts and maintains execution order. How defer Works HTML Parsing Script Download Script Execution 1. HTML parsing continues while script downloads 2. Script waits until DOM is complete 3. Scripts execute in document order ...
Read MoreHow to use style attribute to define style rules?
The style attribute allows you to apply CSS rules directly to individual HTML elements. This is called inline CSS and provides element-specific styling with the highest specificity. Syntax Content Example: Basic Inline Styling Inline CSS Example This is inline CSS Styled div with multiple properties Example: Multiple Style Properties ...
Read MoreHow to Validate your Website Code?
Website development involves writing code in HTML, CSS, JavaScript and your chosen platform. Your website may look correct and responsive, but it could have internal validation issues that affect SEO, accessibility, and browser compatibility. The W3C (World Wide Web Consortium) provides several free tools to validate your website code and ensure it meets web standards. HTML5 Validation Validator.nu is the recommended validator for modern HTML5 documents. It also validates ARIA, SVG 1.1, and MathML 2.0. This tool checks your complete document and identifies where the markup doesn't follow the specified doctype. ...
Read MoreWhat is the difference between an acronym and abbr tags?
In HTML, both acronym and abbreviation tags are used to mark shortened forms of words or phrases, but they have key differences in support and usage. An acronym is a word formed by taking the first letters of each word in a phrase (like "NASA" from "National Aeronautics and Space Administration"). An abbreviation is any shortened form of a word or phrase (like "Mr." for "Mister"). The Acronym Tag (Deprecated) The tag was used in older HTML versions to mark acronyms specifically. However, it is deprecated in HTML5 and should not be used in modern web ...
Read More