Front End Scripts Articles

Page 18 of 47

Indent the first line of a paragraph in CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 4K+ Views

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 More

Is there any way to embed a PDF file into an HTML5 page?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 783 Views

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 More

Usage of border property with CSS

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 88 Views

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 More

Autocomplete text input for HTML5?

George John
George John
Updated on 15-Mar-2026 511 Views

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 More

Change the color of right border with CSS

George John
George John
Updated on 15-Mar-2026 241 Views

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 More

IE supports the HTML5 File API

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 201 Views

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 More

Change the Color of Link when a Mouse Hovers

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 1K+ Views

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 More

How to avoid repeat reloading of HTML video on the same page?

Nancy Den
Nancy Den
Updated on 15-Mar-2026 918 Views

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 More

Set width between table cells with CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 315 Views

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 More

How can I use Web Workers in HTML5?

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 215 Views

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
Showing 171–180 of 465 articles
« Prev 1 16 17 18 19 20 47 Next »
Advertisements