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 64 of 151
How to set an equivalent of the \"cover\" Value of the background-size Property for an img Tag?
When creating responsive images in web design, a common requirement is to make the image fill the entire container while preserving its aspect ratio. The CSS background-size: cover; property achieves this effect for background images, but for inline images using the tag, we need a different approach. The object-fit property provides an equivalent solution for elements. Syntax Following is the syntax for using object-fit on an element − img { width: 100%; height: 100%; object-fit: cover; } For comparison, ...
Read MoreHow to Display Unordered List in Two Columns?
In HTML, unordered lists are collections of items that do not have to be in any particular order. To list these items, we frequently use simple bullet points and that is why they are often known as bulleted lists. An unordered list begins with the tag and closes with a tag. The list items begin with the tag and end with tag. The tag, which stands for unordered list, is the tag's parent. This means that the tag is the tag's child. By default, unordered lists display items in a single ...
Read MoreHow to Create a Form with Custom Buttons in HTML
Buttons are interactive HTML elements that trigger specific actions when clicked. In HTML forms, the element by default has type="submit", which submits the form data to the server. Custom buttons enhance user experience by providing styled, functional controls with personalized appearance and behavior. HTML forms support different HTTP methods − GET appends form data to the URL (visible and less secure), while POST sends data in the request body (hidden and more secure). For sensitive information like user credentials, always use the POST method. Syntax Following is the basic syntax for creating an HTML form − ...
Read MoreHow to Create Time-Table Schedule using HTML?
A timetable is an essential tool for organizing daily activities and improving productivity. In this article, you will learn how to create a simple and effective weekly timetable using HTML. This timetable will include time slots, subjects, and lunch breaks, along with highlighting weekends as holidays. HTML Tags used to Create Time-Table The main tag used for creating a table is the tag in HTML. Tables allow us to represent structured data in rows and columns, which makes them perfect for displaying time schedules. List of tags required to create a time-table − ...
Read MoreWhich of the following is not a valid HTML tag: h1, H, h2, h3?
HTML uses specific tags to structure and organize content on web pages. Understanding which tags are valid and which are not is crucial for proper HTML development. The question asks about the validity of four potential heading tags: h1, H, h2, and h3. HTML Tag Syntax HTML tags follow a specific syntax structure enclosed in angle brackets − Content Valid HTML tags must have defined names in the HTML specification. Tag names are case-insensitive, meaning and are equivalent. HTML Heading Tags HTML provides six levels of heading tags to create ...
Read MoreHow to display Base64 images in HTML?
To display images encoded with Base64, you need to get the base64 encoded string and use the img element. This prevents the page from loading slowly and saves the web browser from additional HTTP requests. Base64 images are embedded directly into HTML using Data URLs, which eliminate the need for separate image files. This technique is useful for small images, icons, or when you want to reduce HTTP requests. Syntax Following is the syntax for displaying a Base64 image in HTML − Where − [format] is the image format (jpeg, png, ...
Read MoreHTML DOM Input Range disabled property
The HTML DOM Input Range disabled property sets or returns whether a range slider should be disabled. When set to true, the range slider becomes greyed out and unresponsive to user interaction. The property accepts boolean values and defaults to false. Syntax Following is the syntax for setting the disabled property − rangeObject.disabled = true|false; Following is the syntax for getting the disabled property − var isDisabled = rangeObject.disabled; Parameters The disabled property accepts the following boolean values − true − The range slider is disabled and ...
Read MoreHow to create headings in HTML page?
Headings are the titles or subtitles of content that you want to display on a web page. They help users understand the structure and hierarchy of information, making content easier to scan and navigate. HTML provides six different levels of heading tags, from to , where represents the most important heading and the least important. Heading tags should be used in logical order to create proper document structure. Use for main headings, followed by for major sections, then for subsections, and so on. This hierarchy is important for both search engine optimization and ...
Read MoreHow to use image height and width attribute in HTML Page?
Images make web content more engaging and help users better understand the information presented. In HTML, we can control the display size of images using the width and height attributes of the tag. The tag is a self-closing element that requires the src attribute to specify the image location. The width and height attributes allow us to define the display dimensions of the image without modifying the original file. Syntax Following is the syntax for using width and height attributes with the image tag − The width and height values ...
Read MoreHow to make an image responsive in HTML?
Responsive images automatically adjust to fit different screen sizes and device dimensions. This ensures that images scale appropriately on desktops, tablets, and mobile devices without breaking the layout or becoming too large or small to view properly. To make an image responsive in HTML, we use the tag combined with CSS properties that control the image's width and height behavior. The key is setting the width to scale with the container while maintaining the image's aspect ratio. Syntax Following are the main CSS properties used to make images responsive − width: 100%; height: auto; ...
Read More