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
Front End Technology Articles
Page 96 of 652
HTML DOM Superscript Object
The HTML DOM Superscript Object represents the element in an HTML document. The superscript element displays text as superscript, which appears half a character above the normal line and is often rendered in a smaller font size. This is commonly used for mathematical exponents, footnote references, and ordinal numbers. Syntax Following is the syntax to create a superscript object using JavaScript − document.createElement("SUP"); Properties The Superscript object inherits all properties from the generic HTMLElement object, including − innerHTML − Gets or sets the HTML content inside the superscript element. textContent ...
Read MoreHTML DOM Table Object
The HTML DOM Table Object represents the element in HTML. It provides properties and methods to dynamically create, modify, and manipulate table elements using JavaScript. This object allows developers to programmatically interact with tables without directly modifying HTML markup. Syntax To create a new table object using JavaScript − document.createElement("TABLE"); To access an existing table element − document.getElementById("tableId"); document.getElementsByTagName("table")[0]; Properties The DOM Table Object provides the following key properties − Property Description caption Returns or sets the element of ...
Read MoreHow to set background color in HTML?
Setting the background color in HTML allows you to customize the appearance of your web page and create visually appealing layouts. In modern HTML5, background colors are set using CSS, either through inline styles or external stylesheets. Syntax Following is the basic syntax to set background color using the CSS background-color property − Alternatively, you can use CSS in the section − body { background-color: colorname; } Note − The bgcolor attribute was deprecated in HTML5. Always use the CSS background-color property instead. Setting ...
Read MoreHow to center align text in table cells in HTML?
We use the CSS property text-align to center align text in table cells. The text-align property controls the horizontal alignment of content within and elements. By default, table header cells () are center-aligned, while table data cells () are left-aligned. We can override this default behavior using CSS to achieve the desired alignment. The property accepts values like center, left, right, and justify. Syntax Following is the syntax to center align text in elements − Table header... Following is the syntax to center align text in elements − ...
Read MoreHow to make page links in HTML Page?
A link is a connection from one web page to another web page. We can add page links to a web page using HTML links, which are hyperlinks. The tag defines a hyperlink and is used to link from one page to another. The href attribute is used with the tag, which indicates the link's destination. To create page links in an HTML page, we need to use the href attribute of the and tag. Make sure that the tag is placed within the … tags. The link text is visible. Clicking on ...
Read MoreHow to limit the number of characters allowed in form input text field?
In this article, we will learn how to limit the number of characters allowed in form input text field using HTML attributes. HTML provides built-in attributes to control the character limits in input fields. The maxlength attribute sets the maximum number of characters allowed, while the minlength attribute sets the minimum number of characters required for validation. Syntax Following is the syntax for the maxlength attribute − Following is the syntax for the minlength attribute − Both attributes can be used together to set a character range ...
Read MoreHow to remove underline from a link in HTML?
By default, HTML links are displayed with an underline to indicate they are clickable. However, you can remove this underline using the text-decoration CSS property. The most common approach is to use an inline style attribute directly on the link element. Syntax Following is the syntax to remove underline from a link using inline CSS − Link Text You can also use internal or external CSS to apply this style to multiple links − a { text-decoration: none; } Using Inline Style The inline style method applies the text-decoration: ...
Read MoreHow to merge table cells in HTML?
We use the colspan and rowspan attributes to merge cells in HTML tables. The rowspan attribute specifies the number of rows a cell should span vertically, whereas the colspan attribute specifies the number of columns a cell should span horizontally. These attributes should be placed inside the tag or tag to merge table cells and create more complex table layouts. Syntax Following is the syntax for the rowspan attribute to merge rows − cell data Following is the syntax for the colspan attribute to merge columns − cell data ...
Read MoreHow to use an animated image in HTML page?
Animated images in HTML are visual elements that display moving graphics on a web page. They are typically in GIF format (Graphics Interchange Format), which supports animation by storing multiple frames in a single file that play in sequence. We use the tag with the src attribute to add an animated image in HTML. The src attribute specifies the URL or file path of the animated image. You can also control the display size using the height and width attributes or CSS styling. Syntax Following is the basic syntax for adding an animated image − ...
Read MoreHow do we send an email using HTML forms?
To send an email using HTML forms, you can use the mailto protocol in the form's action attribute. This method opens the user's default email client with pre-filled information from the form fields. However, this approach has significant limitations and is not recommended for production websites. Syntax Following is the basic syntax for using mailto in HTML forms − The enctype="text/plain" attribute ensures the form data is sent in a readable plain text format rather than URL-encoded format. Basic Email Form Example Following example demonstrates a ...
Read More