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 52 of 151
How to add space between elements?
In an HTML web page, the space between elements refers to the area around and between different elements, such as text, images, and other HTML elements. There are several ways to add space between elements in web design. One common method is to use CSS (Cascading Style Sheets) to create margins and padding around elements. Syntax Following are the primary CSS properties for adding space between elements − /* Margin - space outside the element */ element { margin: value; margin-top: value; margin-bottom: value; ...
Read MoreHow to Change the Style of a Tag Title Attribute?
The title attribute of HTML elements provides supplementary information that appears as a tooltip when users hover over the element. However, the default browser styling for title tooltips is often plain and may not match your website's design. This article explores methods to customize the appearance of title attribute tooltips using CSS. Default Title Attribute Behavior By default, browsers display title attributes as simple, unstyled tooltips with basic black text on a light background. These tooltips cannot be directly styled using CSS because they are rendered by the browser's native tooltip system. Example − Default Title Attribute ...
Read MoreHTML Screen availHeight Property
The HTML Screen availHeight property returns the available height of the user's screen in pixels, excluding browser interface elements like toolbars, taskbars, and other operating system UI components. This property is useful for determining how much screen space is actually available for displaying content. Syntax Following is the syntax for the availHeight property − screen.availHeight Return Value The availHeight property returns an integer representing the available height of the screen in pixels. This value is always less than or equal to the total screen height (screen.height) because it excludes areas occupied by the ...
Read MoreHTML Screen availWidth Property
The HTML Screen availWidth property returns the available width of the user's screen in pixels, excluding browser interface elements like toolbars, scrollbars, and other UI components. This property is part of the Screen object in JavaScript and provides the actual usable screen width for web content. Syntax Following is the syntax for the availWidth property − screen.availWidth Return Value The screen.availWidth property returns an integer representing the available screen width in pixels. This value is always less than or equal to the total screen width (screen.width) as it excludes the space occupied by ...
Read MoreHTML view Event Property
The HTML view Event property returns a reference to the Window object where the event occurred. This property is available on UI events like mouse clicks, keyboard inputs, and focus events, providing access to the window context in which the event was triggered. Syntax Following is the syntax for accessing the view property − event.view Return Value The view property returns a Window object reference. In most cases, this will be the same as the global window object. If the event occurs in an iframe or popup window, it returns the reference to ...
Read MoreDesign a table using table tag and its attributes
The HTML tag is used to create structured data displays in rows and columns. Combined with various table attributes like border, cellpadding, cellspacing, and background styling, you can design professional-looking tables for presenting data on web pages. Tables are essential for displaying comparative data, financial reports, schedules, and any information that benefits from a structured grid layout. The table structure uses several nested tags to organize content effectively. Syntax Following is the basic syntax for the HTML tag − Header 1 ...
Read MoreAdvantages and Disadvantages of HTML
The language used to create web pages is known as HTML (Hypertext Markup Language). It is a markup language rather than a programming language. Hypertext is text that contains an embedded link to another web page or website. HTML is used to lay the foundation and structure of a webpage, serving as the backbone of all websites you visit. Every web developer has to learn HTML to begin with. HTML5 is the most recent and most advanced version of HTML. Together with CSS3, it performs fantastically. If you're considering studying this language, you should be aware of its advantages ...
Read MoreHow to update a MySQL column by subtracting a value with some conditions?
Updating a MySQL column by subtracting a value with conditions is a common database operation. You can use the UPDATE statement with a WHERE clause to modify specific rows based on criteria while performing arithmetic operations on column values. Syntax Following is the basic syntax for updating a column by subtracting a value with conditions − UPDATE table_name SET column_name = column_name - value WHERE condition; Where − table_name − The name of the table to update column_name − The column to modify value − The number to subtract from the ...
Read MoreHow to Allow only Positive Numbers in the Input Number Type
The input number type in HTML allows users to enter numeric values, but by default it accepts both positive and negative numbers. To restrict input to only positive numbers, we need to combine HTML attributes with JavaScript validation techniques. The element provides several attributes for controlling numeric input: min, max, step, and value. However, the min attribute alone only restricts the spinner controls and form validation − users can still manually type negative numbers. Syntax Basic syntax for a number input with minimum value restriction − For complete positive-only restriction with ...
Read MoreHTML ontoggle Event Attribute
The HTML ontoggle event attribute is triggered when a user opens or closes a element. This event fires whenever the element's open attribute is added or removed, making it useful for creating interactive collapsible content sections. Syntax Following is the syntax for the ontoggle event attribute − Summary text Content to toggle Where script is the JavaScript function or code to execute when the details element is toggled. Parameters The ontoggle attribute accepts the following parameter − script − JavaScript function ...
Read More