Articles on Trending Technologies

Technical articles with clear explanations and examples

What is the difference between id and name attributes in HTML?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 3K+ Views

The id and name attributes in HTML serve different purposes. The id attribute uniquely identifies an element for CSS styling and JavaScript manipulation on the client side, while the name attribute identifies form data sent to the server as name-value pairs in the HTTP request. Syntax Following is the syntax for using the id attribute − Content Following is the syntax for using the name attribute − The id must be unique within the document, while the name can be shared across multiple elements (e.g., radio buttons in the ...

Read More

What are valid values for the id attribute in HTML?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 2K+ Views

The ID attribute in HTML is a unique identifier for an element. It helps in identifying a specific area on a web page for CSS styling, JavaScript targeting, and anchor linking. Let us first see the common uses of the ID attribute in HTML − Script reference − In JavaScript, we use the ID attribute to select and manipulate a specific element on the page using methods like getElementById(). CSS selector − The ID is used as a selector with the # symbol to apply styles to a single specific element on the page. ...

Read More

Are HTML comments inside script tags a best practice?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 2K+ Views

Before trying to understand whether HTML comments inside script tags is a best practice or not, let us first discuss how comments work in HTML and the different ways to use them. Comments are helpful for understanding code, leaving reminders, and providing explanations. They also help in disabling statements temporarily when testing or working on a new feature. The browser ignores everything inside a comment tag and does not render it on the page. HTML Comment Syntax Following is the basic syntax for writing an HTML comment − The comment starts with ...

Read More

Where should I put tags in HTML markup?

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 1K+ Views

JavaScript code in HTML is placed between and tags. You can place them inside the , within the , or just before the closing tag. The recommended approach is placing scripts before so page content loads first. The tag tells the browser to interpret the content as a script. The type="text/javascript" attribute is optional in modern browsers as JavaScript is the default. Where to Place Tags In Loads before page renders In ...

Read More

What is CDATA in HTML?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 4K+ Views

The full form of CDATA is Character Data. It is a section in XML used to include blocks of text that should be treated as raw character data, not as markup. The XML parser does not parse the content inside a CDATA section, so tags and entities within it are ignored. A CDATA section starts with and ends with the delimiter ]]>. Everything between these markers is treated as plain text. CDATA sections cannot be nested. In HTML, CDATA sections are not used − browsers treat them as comments and do not display them. CDATA is primarily ...

Read More

Which is the best tutorial site to learn HTML?

Nikitha N
Nikitha N
Updated on 16-Mar-2026 221 Views

HTML stands for Hyper Text Markup Language, which is the most widely used language on the web to develop web pages. HTML was created by Tim Berners-Lee in late 1991, and "HTML 2.0" was the first standard HTML specification published in 1995. HTML 4.01 was a major version published in late 1999. The current version is HTML5, which is an extension of HTML 4.01 and was officially published in 2012. What Does HTML Look Like? HTML uses a system of tags to structure content on a web page. Here is a basic example of an HTML page − ...

Read More

Static HTML elements are written directly in SAPUI5

Johar Ali
Johar Ali
Updated on 16-Mar-2026 569 Views

SAPUI5 allows developers to use their own static HTML elements alongside UI5 controls. It is not a closed framework − you can use the sap.ui.core.HTML control to write plain HTML within any area rendered by UI5, making it easy to mix static HTML and UI5 controls in the same view. HTML created by UI5 controls is generated dynamically at runtime. This is how most JavaScript UI libraries work when providing higher-level UI elements that would be complex to write in static HTML alone. However, SAPUI5 gives you the flexibility to embed your own static HTML whenever needed. ...

Read More

Page build in HTML and wanted to load into JS view in SAPUI5 application.

Ali
Ali
Updated on 16-Mar-2026 619 Views

In SAPUI5, you may need to load an HTML page into a JavaScript view. This is useful when you have pre-built HTML content that needs to be displayed within a SAPUI5 application. There are multiple ways to achieve this, including using sap.ui.core.HTML with an iframe, loading HTML content via an AJAX call, or directly embedding HTML content. Syntax Using sap.ui.core.HTML with iframe new sap.ui.core.HTML({ preferDOM: true, content: "" }); The sap.ui.core.HTML control allows you to embed raw HTML content into a SAPUI5 view. Setting preferDOM: true tells the ...

Read More

How can I use multiple submit buttons in an HTML form?

Bhanu Priya
Bhanu Priya
Updated on 16-Mar-2026 13K+ Views

Generally, HTML forms use a single submit button to save or send data. However, in some cases we need multiple submit buttons such as "Save", "Update", or "Delete" within the same form. Each button may perform a different action or send data to a different URL. To handle multiple submit buttons, we can use the formaction attribute, assign the same name with different value attributes, or give each button a different name. The server-side code then determines which button was clicked and processes accordingly. Syntax Using formaction Attribute Default Action ...

Read More

How to validate a form using jQuery?

Arnab Chakraborty
Arnab Chakraborty
Updated on 16-Mar-2026 32K+ Views

To validate a form using jQuery, we can use the jQuery Validation Plugin. This plugin provides a simple way to define validation rules, custom error messages, and submit handlers for HTML forms without writing complex validation logic from scratch. The plugin works by attaching the .validate() method to a form element and defining rules for each input field by its name attribute. Syntax The basic syntax for jQuery form validation is − $(document).ready(function() { $("#formId").validate({ rules: { ...

Read More
Showing 1–10 of 61,301 articles
« Prev 1 2 3 4 5 6131 Next »
Advertisements