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 38 of 151
Difference between HTML and HTTP
HTML and HTTP are foundational technologies of the web that work together but serve different purposes. HTML (HyperText Markup Language) is a markup language used to create and structure web pages, while HTTP (HyperText Transfer Protocol) is a communication protocol that transfers web content between servers and browsers. What is HTML? HTML (HyperText Markup Language) is a markup language used to create the structure and content of web pages. It uses tags to define elements like headings, paragraphs, links, images, and forms that make up a webpage's content and layout. HTML Syntax HTML documents are structured ...
Read MoreHTML DOM InputEvent inputType Property
The HTML DOM InputEvent inputType property returns a string indicating the type of input action that triggered an input event. This property helps identify whether the user is typing text, deleting content, pasting, or performing other input operations on form elements. Syntax Following is the syntax for accessing the inputType property − event.inputType Return Value The inputType property returns a string representing the type of input. Common values include − "insertText" − When user types regular text "deleteContentBackward" − When user presses Backspace "deleteContentForward" − When user presses Delete "insertParagraph" − ...
Read MoreHTML DOM Label htmlFor Property
The HTML DOM Label htmlFor property is used to get or set the value of the for attribute of a label element. The for attribute creates an association between a label and a form control, improving accessibility and user experience by allowing users to click the label to focus or activate the associated form element. Syntax Following is the syntax for getting the for attribute value − labelObject.htmlFor Following is the syntax for setting the for attribute value − labelObject.htmlFor = "elementId" Return Value The htmlFor property returns a ...
Read MoreHow to make div with left aligned text and right aligned icon using CSS ?
Creating a div with left-aligned text and right-aligned icon is a common layout requirement in web development. The element serves as a container that can hold both text content and icons in a structured format. Using CSS, we can position these elements precisely within the same horizontal line. This article demonstrates three different CSS approaches to achieve this layout: the float property, CSS flexbox, and CSS table display methods. Each technique offers unique advantages for different scenarios. Icon Used in Examples All examples use the Material Icons library to display an "album" icon. The following setup ...
Read MoreHow to autoplay audio on chrome?
Modern web browsers, including Chrome, have strict autoplay policies that prevent audio from playing automatically without user interaction. This is designed to improve user experience and prevent unwanted sounds. However, there are legitimate ways to implement audio autoplay functionality while respecting these browser policies. In this article, we will explore different approaches to handle audio autoplay in Chrome, understanding both the technical implementation and the browser limitations that developers must work within. Chrome's Autoplay Policy Chrome blocks autoplay audio unless one of these conditions is met − The user has interacted with the page (clicked, ...
Read MoreHow to design mobile touch slider using Swiper.js Plugin?
The Swiper.js plugin is a powerful JavaScript library for creating mobile-friendly touch sliders with smooth animations and intuitive navigation. It provides extensive customization options, making it ideal for building responsive image carousels, content sliders, and interactive galleries that work seamlessly across all devices. Syntax Following is the basic HTML structure for implementing Swiper.js − Slide content Slide content Following is the JavaScript initialization syntax − const swiper = new Swiper('.swiper', ...
Read MoreHow to create and read the value from cookies
Cookies are small pieces of data stored in the user's browser by web applications. They consist of name-value pairs and are sent back to the server with each HTTP request, allowing websites to remember user information across sessions. Syntax Following is the syntax to create a cookie using JavaScript − document.cookie = "cookieName=cookieValue; expires=date; path=/"; Following is the syntax to read cookies − var allCookies = document.cookie; Parameters cookieName − The identifier for the cookie (e.g., "username", "sessionId"). cookieValue − The data stored in the ...
Read MoreHTML DOM Legend form Property
The HTML DOM Legend form property returns a reference to the form element that contains the element. This property is read-only and provides access to the parent form for DOM manipulation and validation purposes. Syntax Following is the syntax for accessing the form property − legendObject.form Return Value The form property returns a reference to the HTMLFormElement object that contains the legend, or null if the legend is not inside a form. Example Let us see an example demonstrating the Legend form property − ...
Read MoreHow to Search the Parse Tree using BeautifulSoup?
BeautifulSoup is a Python library for parsing HTML and XML documents and searching through the parse tree. The find() and find_all() methods are the most commonly used approaches for locating specific elements within the parsed document structure. BeautifulSoup creates a parse tree from HTML/XML documents, allowing you to search, navigate, and modify the content easily. It provides a simple API that works well for beginners and offers comprehensive documentation for quick learning. Installation Before using BeautifulSoup, install it using pip − pip install beautifulsoup4 Syntax Following are the main methods used for ...
Read MoreHTML DOM li value Property
The HTML DOM li value property allows you to get or set the value attribute of a element. This property is particularly useful when working with ordered lists where you need to control the numbering sequence or create custom list item values. Syntax Following is the syntax for getting the value attribute − liObject.value Following is the syntax for setting the value attribute − liObject.value = "string" Parameters string − A string value that represents the numeric value for the list item. This must be a ...
Read More