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 18 of 47
Indent the first line of a paragraph in CSS
Use the text-indent property to indent the first line of a paragraph. This property accepts values in pixels (px), centimeters (cm), percentages (%), or em units. Syntax text-indent: value; Parameters The text-indent property accepts the following values: Length values: px, em, cm, mm, in, pt, pc Percentage: Relative to the width of the containing block Keywords: inherit, initial, unset Example: Basic Text Indentation You can try to run the following code to indent the first line: ...
Read MoreIs there any way to embed a PDF file into an HTML5 page?
To embed a PDF file in an HTML5 page, you can use several methods. The most common approaches are using the element, element, or element. Using iframe Element (Most Common) The element is the most widely supported method for embedding PDFs: Embed PDF with iframe PDF Embedded with iframe Your browser does not support iframes. ...
Read MoreUsage of border property with CSS
The border property in CSS is used to create visible borders around HTML elements. It's a shorthand property that combines border width, style, and color in a single declaration. Syntax border: width style color; Where: width - thickness in pixels, ems, or other units style - solid, dashed, dotted, double, etc. color - any valid CSS color value Example: Basic Border Usage Here's how to apply different border styles to images: ...
Read MoreAutocomplete text input for HTML5?
Use the autocomplete attribute for autocomplete text input. The autocomplete attribute is used with form elements to set the autocomplete feature on or off. If the autocomplete feature is on, the browser will automatically show values based on what users entered before in the field. If the autocomplete feature is off, the browser won't automatically show values based on what users entered before in the field. Attribute Values The following are the attribute values: S. ...
Read MoreChange the color of right border with CSS
The border-right-color CSS property allows you to change the color of an element's right border specifically, without affecting the other borders. Syntax border-right-color: color; Parameters The color value can be specified using: Color names: red, blue, green Hex values: #FF0000, #00FF00 RGB values: rgb(255, 0, 0) HSL values: hsl(0, 100%, 50%) Example: Basic Right Border Color .demo { border: 3px solid black; ...
Read MoreIE supports the HTML5 File API
Internet Explorer's support for the HTML5 File API varies by version. IE9 does not support the File API, but IE10 and later versions provide full support for file operations. File API Browser Support The File API allows web applications to read file contents and metadata. Here's the IE support timeline: IE9: No File API support IE10+: Full File API support including FileReader, File, and Blob objects Modern browsers: Complete support across Chrome, Firefox, Safari, and Edge Example: File Reading with File API This example ...
Read MoreChange the Color of Link when a Mouse Hovers
To change the color of a link when a mouse pointer hovers over it, use the CSS :hover pseudo-class. This creates an interactive effect that provides visual feedback to users. Syntax a:hover { color: desired-color; } Basic Example Here's how to change a link's color on hover: a { ...
Read MoreHow to avoid repeat reloading of HTML video on the same page?
Use preload="auto" to avoid repeat reloading of HTML video on the same page. The preload attribute controls how much video data the browser should load when the page loads. Preload Attribute Options The preload attribute has three possible values: auto - Browser loads the entire video when the page loads metadata - Browser loads only video metadata (duration, dimensions) none - Browser doesn't load any video data initially Example with preload="auto" ...
Read MoreSet width between table cells with CSS
The border-spacing CSS property controls the distance between adjacent table cells. It only works when border-collapse is set to separate (the default value). Syntax border-spacing: horizontal vertical; border-spacing: value; /* same for both directions */ Parameters The property accepts one or two length values: One value: Sets equal spacing horizontally and vertically Two values: First value for horizontal spacing, second for vertical spacing Example: Basic Border Spacing table.example { ...
Read MoreHow can I use Web Workers in HTML5?
Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions and allows long tasks to be executed without yielding to keep the page responsive. Web Workers are background scripts and they are relatively heavyweight and are not intended to be used in large numbers. For example, it would be inappropriate to launch one worker for each pixel of a four-megapixel image. Web Workers are initialized with the URL of a JavaScript file, which contains the code the worker will execute. This code sets event listeners and communicates with ...
Read More