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
HTML Articles
Page 89 of 151
Bootstrap Helper Classes
Bootstrap helper classes are utility classes that provide quick styling solutions for common layout and formatting needs. These classes include .pull-left, .pull-right, .center-block, .clearfix, and others that help developers apply styles without writing custom CSS. Common Bootstrap Helper Classes Following are the most commonly used Bootstrap helper classes − .pull-left − Floats an element to the left .pull-right − Floats an element to the right .center-block − Centers a block-level element horizontally .clearfix − Clears floated elements within a container .text-left, .text-center, .text-right − Text alignment utilities .show, .hidden − Show or hide elements ...
Read MoreHow to create JLabel to hold multiline of text using HTML in Java?
In Java Swing, the JLabel component by default displays only single-line text. To create a JLabel that can hold multiple lines of text, we need to use HTML formatting within the label text. This allows us to use HTML tags like for line breaks and other HTML formatting elements. Syntax Following is the syntax to create a multiline JLabel using HTML − JLabel label = new JLabel("Line1Line2"); For more complex formatting with alignment − JLabel label = new JLabel("Line1Line2", JLabel.LEFT); How It Works When a JLabel's text starts ...
Read MoreHTML cite Attribute
The cite attribute in HTML specifies a URL that points to a document or source explaining the reason for a modification. It is commonly used with elements like , , , and to provide context or justification for content changes and citations. Syntax Following is the syntax for the cite attribute − inserted text deleted text quoted text quoted content Where URL is the web address of the document that explains the reason for the insertion, deletion, or the source of the quotation. Using Cite with the INS Element The ...
Read MoreHTML autocomplete Attribute
The autocomplete attribute in HTML controls whether the browser should automatically fill input fields based on previously entered values. When set to on, the browser displays suggestions from user's history, while off disables this functionality entirely. Syntax Following is the basic syntax for the autocomplete attribute − The autocomplete attribute can also accept specific values for better control − Attribute Values The autocomplete attribute accepts the following values − on − Enables autocomplete functionality. The browser will suggest values based on user's previous entries. off ...
Read MoreHTML DOM Anchor protocol Property
The HTML DOM Anchor protocol property sets or returns the protocol portion of a URL in an anchor element's href attribute. The protocol identifies the scheme used to access the resource, such as http:, https:, ftp:, or file:. Syntax Following is the syntax to set the protocol property − anchorObject.protocol = "protocol:" Following is the syntax to return the protocol property − anchorObject.protocol Parameters The protocol property accepts a string value representing the URL protocol, including the colon (:). Common values include − http: − Standard web ...
Read MoreHTML DOM Abbreviation Object
The HTML DOM Abbreviation Object represents the element in the Document Object Model. The element is used to display abbreviations or acronyms, often with a title attribute that provides the full expanded text. The Abbreviation object provides access to all the properties and methods of the element, allowing you to manipulate abbreviations dynamically using JavaScript. Syntax To access an abbreviation object using JavaScript − document.getElementById("abbreviationId") To create a new abbreviation object − document.createElement("abbr") Properties The Abbreviation object inherits all properties from the HTMLElement interface. The ...
Read MoreHTML alt Attribute
The alt attribute of the element is used to set alternate text for a clickable area in an image map. This alternate text is displayed when the image cannot load or when users use screen readers for accessibility. The alt text also appears as a tooltip when hovering over the clickable area. Syntax Following is the syntax for the alt attribute in the element − Here, descriptive text is the alternate text that describes the purpose or destination of the clickable area. Purpose and Importance The alt attribute serves ...
Read MoreHTML DOM Anchor pathname Property
The HTML DOM Anchor pathname property is used to set or return the pathname portion of a link's href attribute. The pathname represents the path part of the URL, which comes after the domain name and before any query string or hash fragment. Syntax Following is the syntax to set the pathname property − anchorObject.pathname = path Following is the syntax to return the pathname property − anchorObject.pathname Parameters path − A string that specifies the pathname of the URL. It should start with a forward slash (/) and ...
Read MoreHTML download Attribute
The download attribute of the element is used to set the name of the file to be downloaded when a user clicks on the hyperlink. This attribute forces the browser to download the linked resource instead of navigating to it. Syntax Following is the syntax for the download attribute − Here, filename is the suggested name for the downloaded file. If the value is omitted, the browser will use the original filename from the server. Parameters The download attribute accepts the following value − filename (optional) − A ...
Read MoreHTML width Attribute
The width attribute in HTML is specifically used with the element to control the display width of image-based submit buttons. This attribute allows you to resize images used as form submission buttons without affecting their original file dimensions. Syntax Following is the syntax for using the width attribute with input elements − Here, width represents the desired width in pixels. The height attribute is often used together to maintain proper image proportions. How It Works The width attribute is only applicable to elements. When you specify a width value, ...
Read More