Web Development Articles

Page 101 of 801

Set the coordinates of the area in an image map in HTML?

varma
varma
Updated on 16-Mar-2026 1K+ Views

To set the coordinates of the area in an image map, use the coords attribute in HTML. The coords attribute defines the clickable areas within an image map by specifying precise coordinates that correspond to different shapes like rectangles, circles, and polygons. Syntax Following is the syntax for the coords attribute − The coordinate values depend on the shape type specified in the shape attribute. Coordinate Values by Shape The coords attribute accepts different coordinate formats based on the shape − Rectangle (rect) − coords="x1, y1, x2, y2" where ...

Read More

Align text and select boxes to the same width with HTML and CSS

seetha
seetha
Updated on 16-Mar-2026 1K+ Views

When building forms in HTML, text inputs and select dropdowns often appear to have different widths even when the same width is applied in CSS. This happens because browsers handle the box model differently for different form elements, with padding and borders affecting the total rendered size. The solution is to use the CSS box-sizing property set to border-box. This ensures that padding and borders are included within the specified width rather than added to it, making all form elements render at exactly the same visual width. Syntax Following is the syntax for the box-sizing property − ...

Read More

Execute a script when the element gets user input in HTML?

mkotla
mkotla
Updated on 16-Mar-2026 2K+ Views

The oninput event attribute is used to execute a script when an element receives user input. This event fires immediately when the user types, deletes, or modifies content in form elements like text inputs, textareas, and content-editable elements. Syntax Following is the syntax for the oninput event attribute − Where script is the JavaScript code to execute when the input event occurs. How It Works The oninput event triggers whenever the value of an input element changes. Unlike onchange, which fires only when the element loses focus, oninput fires in real-time ...

Read More

How to create an ordered list with list items numbered with lowercase letters in HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 2K+ Views

An ordered list is a numbered list of items that allows you to control the sequence numbering format. The tag creates ordered lists in HTML, while the tag defines individual list items. By default, ordered lists use numbers (1, 2, 3...), but you can customize the numbering format using the type attribute. To create an ordered list with lowercase letters (a, b, c...), use type="a" on the element. This is particularly useful for sub-lists, legal documents, or any content where alphabetical ordering is preferred over numerical. Syntax Following is the syntax to create an ...

Read More

Changing three.js background to transparent or another color in HTML

Giri Raju
Giri Raju
Updated on 16-Mar-2026 2K+ Views

In three.js, you can customize the background of your scene by making it transparent or setting it to a specific color. This is achieved through the WebGLRenderer configuration and the setClearColor method. Syntax Following is the syntax for creating a transparent background − var renderer = new THREE.WebGLRenderer({ alpha: true }); renderer.setClearColor(0x000000, 0); Following is the syntax for setting a background color − renderer.setClearColor(colorHex, alpha); Parameters The setClearColor method accepts the following parameters − colorHex − A hexadecimal color value (e.g., 0xff0000 for red) alpha − Opacity ...

Read More

How to create an ordered list in HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 4K+ Views

An ordered list is a numbered list of items that displays content in a sequential, numbered format. It allows you to control the numbering sequence and group related items in a structured manner. HTML provides the tag to create ordered lists, with each item defined using the tag. The element automatically numbers each list item, starting from 1 by default. You can customize the numbering style using the type attribute to display numbers, letters, or Roman numerals. Syntax Following is the basic syntax to create an ordered list in HTML − ...

Read More

How do I wrap text in a \'pre\' tag in HTML?

Lokesh Badavath
Lokesh Badavath
Updated on 16-Mar-2026 1K+ Views

In this article, we are going to learn how to wrap text in a tag in HTML. The HTML tag is used to display preformatted blocks of text exactly as they appear in the source code, preserving all spaces, line breaks, and indentation. Preformatted text refers to content that has already been formatted and should be displayed without any additional formatting changes by the browser. The tag preserves whitespace and uses a monospace font by default, making it ideal for displaying code, poetry, ASCII art, or any text where spacing is important. Syntax Following ...

Read More

How to add an article in HTML5?

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 1K+ Views

The article element is one of the new semantic sectioning elements introduced in HTML5. The tag represents a self-contained composition in a document, such as a blog post, news article, forum post, or any independent piece of content that makes sense on its own. The element is particularly useful for content syndication, as it identifies content that could be distributed independently from the rest of the page. Search engines and screen readers also use this semantic information to better understand page structure. Syntax Following is the syntax for the element in HTML5 − ...

Read More

How to specify the HTML content of the page to show in the <iframe&gt in HTML?

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 16-Mar-2026 4K+ Views

In this article, we need to display the HTML content of the page in an iframe; a browser window divided as a separate page. We can achieve this task using the tag and its srcdoc attribute. HTML Tag The tag in HTML specifies an inline frame. This inline frame is used to embed another document within the current HTML document. This tag is supported by all modern browsers including Google Chrome, Microsoft Edge, Firefox, Safari, and Opera. The srcdoc attribute of the tag is used to specify the HTML content of the page ...

Read More

How to use autocomplete attribute in HTML?

Kumar Varma
Kumar Varma
Updated on 16-Mar-2026 720 Views

The HTML autocomplete attribute controls whether browsers should automatically fill in form fields based on previously entered values. When set to on, the browser provides suggestions from the user's input history. When set to off, it disables this functionality for enhanced privacy or security. The autocomplete attribute can be applied to both elements (affecting all contained inputs) and individual elements for granular control. Syntax Following is the syntax for using the autocomplete attribute with form elements − ... Following is the syntax for using the autocomplete attribute with input elements − ...

Read More
Showing 1001–1010 of 8,010 articles
« Prev 1 99 100 101 102 103 801 Next »
Advertisements