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
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to use inline CSS (Style Sheet) in HTML?
Inline CSS allows you to apply styling directly to individual HTML elements using the style attribute. This method is useful for quick, element-specific styling without creating separate CSS files or blocks. Inline CSS is one of three ways to apply CSS to HTML elements − Inline CSS − Using the style attribute directly within HTML tags. Internal CSS − Using tags in the document head. External CSS − Linking to separate CSS files. Inline CSS takes the highest precedence and will override internal and external styles applied to the same element. Syntax ...
Read MoreHow to represent text that must be isolated from its surrounding for bidirectional text formatting in HTML?
The (Bidirectional Isolate) HTML element tells the browser's bidirectional algorithm to treat the text it contains independently from its surrounding content. This is essential when embedding text of unknown directionality, such as user-generated content or dynamic text from databases. Languages like Arabic, Hebrew, and Urdu are written from right-to-left (RTL), while English and most other languages are written left-to-right (LTR). When mixing these text directions in a single document, proper isolation prevents text rendering issues and ensures correct display order. Syntax Following is the basic syntax for the element − text content ...
Read MoreSet the width of the element in HTML
The width attribute in HTML sets the width of an element in pixels. This attribute is supported by several HTML elements including , , , , , and . The width attribute provides a quick way to control element dimensions directly in HTML markup. Syntax Following is the syntax for using the width attribute − The value is specified in pixels as a positive integer. For example, width="300" sets the element width to 300 pixels. Elements Supporting Width Attribute The width attribute can be used with the following HTML elements − ...
Read MoreHTML DOM Select value Property
The HTML DOM select value property is used to get or set the value of the selected option in a dropdown list. This property returns the value of the currently selected option or allows you to programmatically select an option by setting its value. Syntax Following is the syntax for returning the selected value − selectObject.value Following is the syntax for setting the selected value − selectObject.value = "optionValue" Return Value The property returns a string representing the value of the currently selected option. If no value attribute is ...
Read MoreSet the size of the icons in HTML
In this article, we are going to discuss how to set the size of the icons in HTML. Icons are essential visual elements that enhance user experience by providing intuitive symbols for actions, navigation, and content representation. An icon is a symbol that represents a specific action on a webpage. The Icon Fonts contain symbols and glyphs that can be easily styled with CSS just like regular text. There are several icon libraries (fonts) that provide icons and can be used on HTML webpages. The prominent icon fonts frequently used by web developers are Font Awesome, Bootstrap Glyphicons, ...
Read MoreHTML DOM Select type Property
The HTML DOM Select type property is a read-only property that returns the type of form control for a select element. For HTML elements, this property always returns "select-one" for single-selection dropdowns or "select-multiple" for multi-selection lists. Syntax Following is the syntax for accessing the type property − selectObject.type Return Value The type property returns a string value − "select-one" − For single-selection dropdown lists (default behavior) "select-multiple" − For multi-selection lists (when multiple attribute is present) Example − Single Selection Dropdown Following example demonstrates the type ...
Read MoreHow to use internal CSS (Style Sheet) in HTML?
Internal CSS is a method of applying styles to HTML elements by placing CSS rules inside a tag within the section of an HTML document. This approach allows you to define styles for a single HTML page without using external CSS files. Internal CSS is particularly useful when you want to apply unique styles to a specific page that differ from your site's global styles, or when creating standalone HTML documents that need their own styling. Syntax Following is the syntax for internal CSS − ...
Read MoreSet the number of columns to span in HTML
The colspan attribute in HTML allows you to set the number of columns that a table cell should span. This enables a single or element to stretch across multiple columns, similar to the "merge cells" feature in spreadsheet applications like Excel. The colspan attribute is essential for creating complex table layouts where certain cells need to occupy more horizontal space than others, such as headers that span across multiple data columns or summary rows that extend across the entire table width. Syntax Following is the syntax for the colspan attribute − Content Content ...
Read MoreHTML DOM Select size Property
The HTML DOM select.size property returns and modifies the value of the size attribute of a dropdown list. This property controls how many options are visible at once in the select element without scrolling. Syntax Following is the syntax for returning the size value − selectObject.size Following is the syntax for setting the size value − selectObject.size = number Parameters The size property accepts the following parameter − number − A positive integer that specifies how many options should be visible in the dropdown list without scrolling. ...
Read MoreHTML DOM Input Email type Property
The HTML DOM Input Email type property returns or sets the type attribute of an input element that is currently of type "email". This property allows you to dynamically change the input type from email to other supported input types using JavaScript. Syntax Following is the syntax for returning the type value − inputEmailObject.type Following is the syntax for setting the type value − inputEmailObject.type = stringValue Return Value The property returns a string representing the current type of the input element. For an email input, it returns "email". ...
Read More