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
Articles on Trending Technologies
Technical articles with clear explanations and examples
Where should I put tags in HTML markup?
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 MoreWhat is CDATA in HTML?
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 MoreWhich is the best tutorial site to learn HTML?
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 MoreStatic HTML elements are written directly in SAPUI5
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 MorePage build in HTML and wanted to load into JS view in SAPUI5 application.
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 MoreHow can I use multiple submit buttons in an HTML form?
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 MoreHow to validate a form using jQuery?
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 MoreHow to horizontally center a <div> in another?
To horizontally center a div inside another div, we need to apply CSS centering techniques on the inner element. The most common methods include using margin: 0 auto, flexbox, and position with transform. The key principle is that the inner div must have a defined width smaller than its parent, so the browser can calculate equal space on both sides to center it. Outer DIV (full width) Inner DIV (centered) auto margin auto margin ...
Read MoreHow to place two divs next to each other in HTML?
A DIV tag is a division element in HTML used to group and separate content on web pages. It helps organize text, images, navigation bars, and other elements into distinct sections. A tag consists of an opening and closing tag. Both are required. DIV elements can be styled with CSS or manipulated with JavaScript using the class or id attributes. Placing Two Divs Next to Each Other By default, elements are block-level and stack vertically. To place them side by side, we can use CSS properties like float, display: inline-block, or display: flex. ...
Read MoreWhat is the difference between height and line-height?
The height property defines the vertical measurement of an element's content area, while line-height controls the spacing between lines of text within that element. The height property sets the overall vertical size of a container, such as a div or paragraph. When content exceeds this height, it may overflow or be clipped depending on the overflow settings. The line-height property specifies the minimum height of line boxes within the element. It determines the vertical space between lines of text, affecting readability and visual spacing. Line-height can be specified in pixels, percentages, or as a unitless number (multiplier of ...
Read More