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 100 of 801
How to allow no breaks in the enclosed text in HTML?
To prevent line breaks in enclosed text in HTML, the tag was traditionally used to force content onto a single line regardless of length. However, this tag is deprecated and not supported in HTML5. Modern HTML uses CSS properties like white-space: nowrap to achieve the same result with better standards compliance. Syntax Following is the deprecated syntax for the tag − Text content Following is the modern CSS approach − white-space: nowrap; The Deprecated Tag The HTML tag instructed browsers not to break the specified ...
Read MoreCreate a selectable list in HTML
The tag is used to create a drop-down list in HTML. A selectable list allows users to choose one or more options from a predefined set of values. By adding the multiple attribute to the element, users can select multiple options by holding the Ctrl key (Windows) or Cmd key (Mac) while clicking. Syntax Following is the basic syntax for creating a selectable list − Option Text 1 Option Text 2 To create a multiple selection list, add the multiple attribute − ...
Read MoreHow to display ruby annotation in HTML5?
Ruby annotations in HTML5 provide a way to display small text above, below, or alongside base text, primarily used for pronunciation guides in East Asian languages. The ruby element works together with rt (ruby text) and rp (ruby parentheses) elements to create readable annotations. Syntax Following is the basic syntax for ruby annotations − base text annotation text With fallback parentheses for unsupported browsers − base text (annotation text) Ruby Elements The ruby annotation system consists of three main ...
Read MoreHow to set table width in HTML?
Setting table width in HTML controls how much horizontal space the table occupies on a web page. You can set table width using the inline style attribute with the width CSS property. The width can be specified in percentage (relative to parent container) or pixels (fixed width). Syntax Following is the syntax to set table width using inline styles − The width value can be specified as − Percentage − width: 50% (relative to container width) Pixels − width: 400px (fixed width) Keywords − width: 100% ...
Read MoreHow to create an unordered list without bullets in HTML?
An unordered list in HTML displays a list of items marked with bullets (•), circles, discs, or squares by default. The tag creates an unordered list, and each list item is defined using the tag. However, sometimes you need to display a list without any bullets for cleaner presentation or custom styling. To remove bullets from an unordered list, you can use the CSS list-style-type property set to none. This property controls the appearance of list item markers and can be applied inline or through external CSS. Syntax Following is the syntax to create an ...
Read MoreWhat is the difference between novalidate and formnovalidate attributes?
The novalidate and formnovalidate attributes are HTML5 attributes used to bypass form validation. The novalidate attribute is applied to the element to disable validation for the entire form, while formnovalidate is applied to individual submit buttons to override form validation on a per-button basis. Both attributes are Boolean attributes, meaning their presence enables the functionality regardless of their value. These attributes are particularly useful when you want to allow users to save form progress or submit incomplete forms in certain scenarios. Syntax Following is the syntax for the novalidate attribute − ...
Read MoreHTML5 canvas ctx.fillText won\'t do line breaks
The fillText() method in HTML5 Canvas draws filled text but does not automatically handle line breaks. When you include newline characters () in your text string, they are ignored and the text appears as a single line. To create line breaks, you must manually split the text and call fillText() multiple times for each line. Syntax Following is the syntax for the fillText() method − context.fillText(text, x, y, maxWidth); To create line breaks, split the text and draw each line separately − var lines = text.split(''); for (var i = 0; i ...
Read MoreConvert HTML5 into standalone Android App
Converting an HTML5 application into a standalone Android app allows you to distribute your web-based content through the Google Play Store. This process involves creating a WebView-based Android application that loads and displays your HTML5 content locally. A WebView acts as a browser component within your Android app, providing the ability to display web content without requiring an internet connection when files are stored locally. Prerequisites Before starting the conversion process, ensure you have the following − Android Studio − The official IDE for Android development HTML5 files − Your complete web application including HTML, ...
Read MoreWhat is horizontal rule in HTML Page?
The tag in HTML creates a horizontal rule that serves as a visual separator between content sections on a web page. It displays as a horizontal line and is most commonly used to divide content thematically, making the page structure clearer and more readable. The tag is a self-closing element in HTML, meaning it doesn't require a closing tag. It creates a thematic break in the content flow and is rendered as a horizontal line by default. Syntax Following is the syntax for the tag − The tag ...
Read MoreChange colour of an image drawn on an HTML5 canvas element.
In order to change the color of an image drawn on an HTML5 Canvas element, you need to manipulate the pixel data of the image. This is achieved by using the drawImage() method to draw the image onto the canvas, then accessing and modifying the pixel data using getImageData() and putImageData() methods. Syntax Following is the syntax for drawing an image on canvas − ctx.drawImage(image, x, y); Following is the syntax for getting image data − var imageData = ctx.getImageData(x, y, width, height); Following is the syntax for putting modified ...
Read More