HTML Articles

Page 52 of 151

How to add space between elements?

Shabaz Alam
Shabaz Alam
Updated on 16-Mar-2026 66K+ Views

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 More

How to Change the Style of a Tag Title Attribute?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 16-Mar-2026 6K+ Views

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 More

HTML Screen availHeight Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 297 Views

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 More

HTML Screen availWidth Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 169 Views

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 More

HTML view Event Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 149 Views

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 More

Design a table using table tag and its attributes

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 519 Views

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 More

Advantages and Disadvantages of HTML

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

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 More

How to update a MySQL column by subtracting a value with some conditions?

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 984 Views

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 More

How to Allow only Positive Numbers in the Input Number Type

Eesha Gandhi
Eesha Gandhi
Updated on 16-Mar-2026 18K+ Views

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 More

HTML ontoggle Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 237 Views

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
Showing 511–520 of 1,509 articles
« Prev 1 50 51 52 53 54 151 Next »
Advertisements