The web basics a SAPUI5 developer needs: how a browser talks to a server, how an HTML page is built, and how CSS styles and lays it out. UI5 renders the HTML for you, but you still read it in the browser DevTools every day, write the index.html bootstrap, add custom CSS and choose themes. JavaScript, jQuery and Node.js follow on SAPUI5 › 02 · JavaScript, jQuery & Node.js.
Part 1 – How the web works (client, server, HTTP)
The web is a client–server system. The client (a browser) sends an HTTP request; the server answers with an HTTP response. HTTP is stateless: every request carries everything the server needs (URL, headers, cookies or token). HTTPS is HTTP encrypted with TLS.

Part | Request | Response |
|---|---|---|
First line | Method + URL, e.g. | Status code, e.g. |
Headers |
|
|
Body | Optional – data for POST / PUT / PATCH (JSON, form data) | HTML, CSS, JavaScript, images, JSON or XML |
HTTP methods and status codes
Method | Meaning | Typical OData use |
|---|---|---|
GET | Read a resource (no body, no side effects) | Read an entity set or one entity |
POST | Create a resource, or trigger an action | Create an entity, call an action, |
PUT | Replace the whole resource | Full update of an entity |
PATCH | Change only the fields sent (partial update) | Partial update (V4 default; MERGE in V2) |
DELETE | Remove a resource | Delete an entity |
Code | Meaning | When you see it |
|---|---|---|
200 OK | Success with a body | Read worked |
201 Created | Resource created | After a POST |
204 No Content | Success without a body | After PUT / PATCH / DELETE |
304 Not Modified | Cached copy is still valid | Static files, |
400 Bad Request | Request is wrong (syntax, validation) | Wrong filter, invalid value |
401 Unauthorized | Not logged in / no valid credentials | Session expired |
403 Forbidden | Logged in but not allowed | Missing role or authorization; missing CSRF token |
404 Not Found | URL or entity does not exist | Wrong service path or key |
500 Internal Server Error | The server code failed | ABAP dump behind an OData call |
- Ways a browser sends requests: typing a URL or clicking a link (GET), submitting a
<form>(GET or POST), and JavaScript calls withfetch()orXMLHttpRequest– called AJAX (page reloads are not needed). UI5 models (ODataModel,JSONModel) send AJAX requests for you. - Same-origin policy: JavaScript may only call the server the page came from (same protocol, host and port) unless the server allows it with CORS headers. In UI5 projects a proxy in the UI5 Tooling / SAP BTP destination solves this.
- Browsers natively understand HTML (structure), CSS (look) and JavaScript (behaviour) – plus SVG, images and WebAssembly. Common browsers: Chrome, Edge, Firefox, Safari. Legacy: Internet Explorer is retired and not supported by current UI5.
- F12 opens the browser DevTools: Elements (live DOM and CSS), Console, Sources (debugger), Network (every request – essential for OData calls), Application (storage, cookies).
OData itself (SAP Gateway, SEGW, query options) is covered in CORE ABAP › 08 OData.
Part 2 – HTML basics and the document structure
HTML (HyperText Markup Language) describes the structure and meaning of a web page with tags (also called elements). A file of HTML is an HTML document. HTML is a markup language, not a programming language: it has no variables, loops or IF logic. Without JavaScript the page is static; JavaScript (and therefore UI5) changes it at runtime.
HTML5 | SAPUI5 | |
|---|---|---|
What | Markup language (standard) | JavaScript UI framework (library of controls) |
Maintained by | WHATWG – the HTML Living Standard | SAP (OpenUI5 is the open-source core) |
You write | Tags: | Controls in XML views / JS: |
Result | The browser builds the DOM from it | UI5 renders controls into HTML + CSS at runtime |
HTML versions
Version | Year | Note |
|---|---|---|
HTML (first tag set) | 1991 | Tim Berners-Lee's original tags |
HTML 2.0 | 1995 | First standard (IETF RFC 1866) |
HTML 3.2 | 1997 | W3C Recommendation (HTML 3.0 was a draft only) |
HTML 4.01 | 1999 | CSS for presentation, many old tags deprecated |
XHTML 1.0 | 2000 | HTML written as strict XML |
HTML5 | 2014 | W3C Recommendation: semantic tags, audio/video, canvas, new input types |
HTML 5.1 / 5.2 | 2016 / 2017 | W3C snapshots |
HTML Living Standard | since 2019 the only spec | Maintained by WHATWG (Apple, Google, Microsoft, Mozilla); no version numbers – it is updated continuously |
- "HTML5" today is simply the common name for modern HTML. CSS is still specified by the W3C.
The skeleton of every page
|
Tag | Purpose |
|---|---|
<!DOCTYPE html> | Tells the browser this is a modern HTML document (standards mode). Not a tag, a declaration. |
<html lang="en"> | Root element; |
<head> | Information about the page – not shown: title, meta, CSS links, scripts |
<meta charset="utf-8"> | Character encoding (umlauts, €, any language) |
<meta name="viewport" …> | Use the device width on phones – required for responsive pages and UI5/Fiori on mobile |
<title> | Text in the browser tab, bookmarks and search results |
<link rel="stylesheet"> | Loads an external CSS file |
<script src defer> | Loads JavaScript; |
<body> | Everything the user sees |
<head>is the invisible page header. Do not confuse it with<header>, a visible semantic block inside<body>(Part 6).
The DOM tree
The browser parses the HTML into a tree of objects – the DOM (Document Object Model). Every element, attribute and piece of text becomes a node; nested tags become child nodes. JavaScript reads and changes the page through the DOM API (→ see SAPUI5 › 02), and UI5 controls write their HTML into it. See the live DOM in DevTools › Elements.

Part 3 – Elements and attributes
An element = start tag + content + end tag. Attributes go into the start tag as name="value" pairs.
|
- Write tag and attribute names in lowercase and always quote attribute values.
- Elements can be nested but must close in reverse order:
<p><b>text</b></p>, never<p><b>text</p></b>. - Void (empty) elements have no content and no end tag:
br,hr,img,input,meta,link,area,base,col,embed,source,track,wbr. - HTML is forgiving (browsers repair mistakes). XML views in UI5 are not: they must be well-formed XML – every tag closed (
<Button />), attributes quoted, case-sensitive. - Comments:
<!-- not shown -->. Character entities for reserved characters:<(<),>(>),&(&),"("), (non-breaking space).
Common attributes
Attribute | Used on | Purpose |
|---|---|---|
id | any (global) | Unique name of one element – for CSS |
class | any (global) | One or more style classes, space-separated – for CSS |
style | any (global) | Inline CSS for this element (Part 7) |
title | any (global) | Extra information, shown as a tooltip |
lang | any (global), mostly | Language of the content |
hidden | any (global) | Element is not displayed |
tabindex | any (global) | Keyboard focus order ( |
data-* | any (global) | Your own data, e.g. |
| any (global) | Accessibility information for screen readers (UI5 controls set them for you) |
href |
| Target URL |
src |
| Source file |
alt | <img> | Alternative text if the image cannot be shown or seen – required |
|
| Reserve the space – avoids layout jumps while loading |
Part 4 – Text, links, images and lists
Headings, paragraphs and text formatting
Tag | Meaning |
|---|---|
| Headings; |
<p> | Paragraph – starts on a new line with space above and below |
| Line break / thematic break (horizontal rule) |
<pre> | Preformatted text – keeps spaces and line breaks |
| Important text / text drawn attention to (both bold by default) |
| Stressed emphasis / alternate voice, technical term (both italic) |
| Highlighted text, side comment / fine print |
| Deleted text, inserted text, text that is no longer correct |
| Subscript (H₂O), superscript (x²) |
| Code, keyboard input, program output, variable |
<abbr title> | Abbreviation with its full form as a tooltip |
| Long quotation, short inline quotation, title of a work |
<address> | Contact information |
| Override / isolate the text direction (right-to-left languages) |
| Machine-readable date/time or value |
Links
|
- The mouse pointer turns into a hand over a link. In UI5 use
sap.m.Link; app navigation uses the router and the URL hash (→ see SAPUI5 › 04 · Data, Binding & Navigation).
Images and favicon
|
- The image is linked, not embedded:
<img>reserves a space and the browser loads the file separately.srcandaltare required;loading="lazy"loads it only when it scrolls into view. - The favicon is the small icon in the browser tab next to the title, usually
favicon.icoin the web root. - Related:
<figure>+<figcaption>(image with caption),<picture>+<source>(different files per screen size),<svg>(vector graphics),<canvas>(drawing by script),<video>,<audio>,<track>,<iframe>(another page inside the page), image maps with<map>and<area>.
Lists
|
<li>= list item (insideul/ol),<dt>= term,<dd>= its description.<menu>is a list of commands (toolbar) and behaves like<ul>.
Part 5 – Tables and forms
Tables
|
Tag | Meaning |
|---|---|
<table> | The table |
<caption> | Table title |
| Header rows, data rows, footer rows |
<tr> | Table row |
| Header cell (bold, centred) / data cell; |
| Style whole columns |
- Use tables for tabular data, never for page layout (use Flexbox / Grid). In UI5:
sap.m.Table(responsive),sap.ui.table.Table(grid table for many rows).
Forms and input types
|
Input type / element | Shows | UI5 control |
|---|---|---|
| Text field (email/url are validated, mobile keyboards adapt) | sap.m.Input |
| Number field with arrows / slider |
|
| Date / time picker |
|
| Tick box / one choice of a group (same |
|
file | File chooser |
|
| Drop-down list |
|
<textarea> | Multi-line text | sap.m.TextArea |
<button> | Button ( | sap.m.Button |
<label for> | Caption linked to a field (click focuses the field, screen readers read it) |
|
| Group of fields with a title |
|
| Suggestions for an input / a calculated result |
|
- Form attributes:
action(target URL),method(getputs the data in the URL,postin the body). Field attributes:name(key sent to the server),value,placeholder,required,min/max,pattern(regex),readonly,disabled,maxlength. - Browsers validate
required,type="email",min/maxandpatternbefore submitting. Always validate again on the server.
Part 6 – Block vs inline, semantic tags and the tag reference

Block-level and inline elements
Block-level | Inline | |
|---|---|---|
Starts on a new line? | Yes | No – flows inside the text line |
Width | Full available width | Only as wide as its content |
Width / height / vertical margin | Can be set | Ignored on text elements (use |
Examples |
|
|
Generic container |
|
|
- Block or inline is really the CSS
displayvalue each element has by default – CSS can change it. (The HTML standard itself groups elements into content categories such as flow and phrasing content.) - Any element can have an
id(unique) and one or more classes (class="card highlight") – not onlydivandspan.
Semantic layout tags
Semantic tags say what the content is. Screen readers can jump to the main content or navigation, search engines understand the page, and the code is easier to read than a page full of <div>s.
Tag | Use for |
|---|---|
<header> | Introductory part of the page or a section: logo, title, user menu |
<nav> | A block of main navigation links |
<main> | The unique main content – once per page |
<section> | A thematic group of content, normally with a heading |
<article> | Self-contained content that makes sense alone: post, product card, comment |
<aside> | Side content related to the main content |
<footer> | Closing part: copyright, contact, legal links |
| Expandable block (click the summary to open) |
<dialog> | Modal or non-modal dialog box |
<search> | Wrapper for a search form |
<hgroup> | A heading with its sub-heading |
UI5 controls do the same job for you: they render ARIA roles and keyboard handling, and the Fiori page layouts (sap.f.DynamicPage, sap.uxap.ObjectPageLayout) give the header/content/footer structure.
Tag reference by category
Category | Tags |
|---|---|
Basic |
|
Meta information |
|
Text | see the table in Part 4, plus |
Forms |
|
Images and media |
|
Frames and embedding |
|
Links |
|
Lists |
|
Tables |
|
Structure and semantics |
|
Obsolete – do not use |
|
Part 7 – CSS basics: syntax, three ways to apply, the cascade
CSS (Cascading Style Sheets) controls how HTML looks: colours, fonts, spacing, layout, animation and adaptation to screen sizes. It separates content (HTML) from presentation (CSS). Before CSS, styling was done with tags such as <font color="red">, repeated on every element.
Rule syntax
|
- A rule = selector + declaration block
{ … }. Each declaration isproperty: value;. - "CSS3" is a historical label: after CSS 2.1 the language is split into separate modules (Selectors, Box model, Flexbox, Grid, Media Queries …) that evolve independently. Today it is just "CSS".
Three ways to apply CSS
|
Way | Scope | Reuse and maintenance |
|---|---|---|
Inline | One element | Not reusable, hard to maintain, beats normal rules (high priority). Avoid |
Internal | One page | Reusable inside that page only |
External | Whole site / app | Most reusable: one file changes every page, cached by the browser. Standard way – in UI5 |
Cascade, specificity and inheritance
When several rules set the same property on one element, the cascade decides which wins: first importance (!important), then origin (inline style), then specificity, then source order (later wins).

- Specificity is counted as (ids, classes, elements):
#price= 1,0,0;.totalor[type]or:hover= 0,1,0;por::before= 0,0,1. Compare from the left – one ID beats any number of classes. The universal selector*counts 0. - Inheritance: some properties (
color,font-*,line-height,text-align,visibility) pass from parent to children; box properties (margin,padding,border,width,background) do not.inheritforces it. !importantoverrides normal rules but makes CSS hard to maintain – use it only as a last resort.
Part 8 – CSS selectors
Selectors find the elements a rule applies to. Five groups: simple, combinator, pseudo-class, pseudo-element and attribute selectors. jQuery and document.querySelector() use the same syntax (→ see SAPUI5 › 02).
Simple selectors and attribute selectors
Selector | Example | Selects |
|---|---|---|
element | p | All |
.class | .intro | All elements with |
element.class | p.intro | Only |
#id | #firstName | The element with |
* | * | All elements |
| h1, h2, p | All |
[attr] | [required] | Elements that have the attribute |
[attr="v"] | input[type="text"] | Attribute equals the value |
[attr^="v"] | a[href^="https"] | Value starts with |
[attr$="v"] | a[href$=".pdf"] | Value ends with |
[attr*="v"] | [class*="Margin"] | Value contains |
Combinators
Combinator | Example | Selects |
|---|---|---|
Descendant (space) | div p | Every |
Child | div > p |
|
Adjacent sibling | h2 + p | The one |
General sibling | h2 ~ p | Every |
Pseudo-classes – an element in a special state
|
Group | Pseudo-classes |
|---|---|
User action |
|
Links |
|
Form state |
|
Structure |
|
Logic |
|
Language | :lang(de) |
Pseudo-elements – style a part of an element
Pseudo-element | Styles |
|---|---|
| Generated content before / after the element's content (needs |
| First letter / first line of a block of text |
::marker | The bullet or number of a list item |
::selection | Text the user has selected |
::placeholder | Placeholder text of an input |
- Pseudo-classes use one colon (
:hover), pseudo-elements two (::before).
Part 9 – Box model, units, colours, display and position
The box model
The browser draws every element as a rectangular box made of four layers, from inside out:

Layer | What it is |
|---|---|
Content | Text, image or child elements; size set by |
Padding | Space between content and border; takes the element's background |
Border | Line around padding and content ( |
Margin | Transparent space outside the border, separates the box from its neighbours |
|
- Default
box-sizing: content-box:widthis the content only, so padding and border make the box bigger.border-boxis easier and used by almost every modern stylesheet. - Shorthand order is clockwise:
margin: top right bottom left; two values = vertical horizontal. - Margin collapse: vertical margins of neighbouring blocks overlap – the larger one wins, they are not added.
Units and colours
Unit | Relative to | Use for |
|---|---|---|
px | Absolute CSS pixel | Borders, small fixed sizes |
% | Parent's size | Fluid widths |
em | Font size of the element itself | Spacing that grows with the text of the component |
rem | Font size of the root | Fonts and spacing – scales with the user's setting (UI5 uses rem) |
| 1% of the viewport width / height | Full-screen sections |
fr | Share of free space (Grid only) | Grid columns |
- Colours: names (
red), hex (#0a6ed1, short#fff),rgb(10 110 209),rgba(…)/ alpha (rgb(0 0 0 / 50%)),hsl(210 91% 43%). In UI5 use theme parameters instead of fixed colours (Part 12).
display
Value | Effect |
|---|---|
block | New line, full width (default of |
inline | Inside the text line, width/height ignored (default of |
inline-block | In the line, but width, height and vertical margins work |
none | Removed from the layout completely – takes no space |
| Becomes a Flexbox / Grid container for its children (Part 10) |
display: noneremoves the element;visibility: hiddenhides it but keeps its space. UI5 controls withvisible="false"are not rendered at all.
position
Value | Positioned relative to | Stays in normal flow? |
|---|---|---|
| Not positioned – | Yes |
relative | Its own normal position (shift with | Yes – original space kept |
absolute | The nearest positioned ancestor (not | No |
fixed | The viewport – stays when scrolling (e.g. cookie bar) | No |
sticky | Normal until a scroll threshold, then sticks (e.g. table header) | Yes |
z-indexdecides which positioned element lies on top.overflow: auto | hidden | scrollcontrols content that does not fit.- Transitions and animations:
transition: background-color 0.2s;animates a property change;@keyframes+animationdefine longer animations.
Part 10 – Flexbox and Grid
The two modern layout models. Flexbox arranges items in one dimension – a row or a column. Grid arranges them in two dimensions – rows and columns at once. Both replace old tricks with floats and layout tables.

Flexbox
|
Property | Values | Meaning |
|---|---|---|
flex-direction |
| Direction of the main axis |
justify-content |
| Distribute items along the main axis |
align-items |
| Align items on the cross axis |
flex-wrap |
| Allow several lines |
gap | length | Space between items |
|
| How an item grows or shrinks |
| as | Override alignment / visual order for one item |
Grid
|
grid-template-columns/grid-template-rowsdefine the tracks;fr= one share of the free space;repeat(auto-fill, minmax(…))makes a responsive tile layout without media queries.- Items are placed automatically, or with
grid-column/grid-row(span 2,1 / 3) or namedgrid-template-areas.
Layout need | CSS | UI5 control |
|---|---|---|
Items in a row or column | Flexbox |
|
Two-dimensional tiles / cards | Grid |
|
Responsive 12-column layout | Grid-like |
|
Form fields with labels | – |
|
Part 11 – Responsive design, media queries and CSS variables
Responsive web design means one code base that adapts to every screen: phone, tablet, desktop. HTML and CSS resize, hide, stack or move content. The building blocks are the viewport meta tag, relative units, fluid layouts (Flexbox, Grid) and media queries.
|
- Media features:
min-width,max-width,orientation: portrait,prefers-color-scheme: dark,prefers-reduced-motion, media typeprint. - Without
<meta name="viewport" content="width=device-width, initial-scale=1">phones render the page at desktop width and zoom out – media queries do not work as expected. - Newer tools: container queries (
@container (min-width: 400px)) react to the size of the parent instead of the screen;:has()styles a parent based on its children. - In UI5 most of this is built in: responsive controls,
sap.ui.Device(Device.system.phone,Device.media), the content-density classessapUiSizeCompact(mouse) andsapUiSizeCozy(touch), and responsive layouts such assap.f.FlexibleColumnLayout.
CSS custom properties (variables)
|
- Declared with
--name, read withvar(--name, fallback). They inherit and can be changed at runtime (by a class or JavaScript), which makes them ideal for theming. - Native CSS now also supports nesting (
.card { & h2 { … } }) in all current browsers.
Note: preprocessors (Sass and LESS)
A preprocessor adds programming features to CSS and compiles to plain CSS, because browsers only understand CSS. Sass (Syntactically Awesome Style Sheets) has two syntaxes: .scss (a superset of CSS) and the indented .sass. Dart Sass is the maintained compiler; modules are loaded with @use (the old @import is deprecated).
|
- A variable declared inside a block is local;
!globalassigns the top-level variable from inside a block (the variable should already exist at the top level). - LESS is a similar preprocessor (
@brand: #0a6ed1;) – SAPUI5 themes are written in LESS. Many preprocessor features (variables, nesting) are now native CSS.
Part 12 – HTML and CSS in a UI5 app (bootstrap, themes, custom CSS)
In UI5 you hardly write HTML tags: views describe controls, and each control's renderer creates the HTML and CSS classes. The one HTML file you do write is index.html (for standalone apps; in the Fiori launchpad the launchpad itself bootstraps UI5).

|
- The
<script id="sap-ui-bootstrap">loads the UI5 core; thedata-sap-ui-*custom attributes are its configuration: theme, where your namespace lives, what to run on init, asynchronous loading. Details: → see SAPUI5 › 03 · SAPUI5 Fundamentals. sapUiBodygives the page the theme background. For OpenUI5 the CDN ishttps://sdk.openui5.org/resources/sap-ui-core.js.- UI5 recommends CSP-compliant pages: no inline scripts or
onclickattributes, so the start-up code lives in a module (data-sap-ui-on-init="module:…"). - Configuration options are written in kebab-case (
data-sap-ui-resource-roots,data-sap-ui-on-init); camelCase forms such asdata-sap-ui-oninitorbindingSyntaxcome from samples older than UI5 1.120.compat-versionmust beedge, and asynchronous loading is the only mode that has a future (UI5 2.x drops synchronous loading).
Themes and theming
- A theme is the complete visual design of all controls. Current default:
sap_horizon(Morning Horizon), withsap_horizon_dark(Evening Horizon) and the high-contrastsap_horizon_hcb/sap_horizon_hcw. Previous theme:sap_fiori_3(Quartz, still available). Removed:sap_belize(deprecated in 1.120, removed in 1.136) and Blue Crystal – apps that still name them must switch to Horizon. - Set the theme in the bootstrap (
data-sap-ui-theme), with the URL parameter?sap-ui-theme=sap_horizon_dark, or in the launchpad user settings (Appearance). - SAP themes are written in LESS and compiled to CSS by the theme build. Colours, fonts and sizes are theme parameters (e.g.
sapBrandColor,sapBackgroundColor); the SAP theming base content also provides them as CSS custom properties (var(--sapBrandColor)), so custom CSS can follow the active theme. - SAP Theme Designer (SAP BTP, or transaction
/UI5/THEME_DESIGNERon ABAP systems) creates a company theme – logo, brand colours – on top of an SAP theme without code; it works for all apps.
Custom CSS in an app
|
|
|
- Prefer the standard CSS classes: margins
sapUiTinyMargin,sapUiSmallMargin,sapUiMediumMargin,sapUiLargeMargin(+Top,Bottom,Begin,End),sapUiResponsiveMargin,sapUiNoMargin, paddingsapUiContentPadding,sapUiResponsiveContentPadding; densitysapUiSizeCompact/sapUiSizeCozy. - Add classes in XML with
class="…"or in JavaScript withoControl.addStyleClass("myClass"). - Do not override internal UI5 classes (
.sapMBtn…) or use!important– they are not a stable API and break with upgrades or theme changes.Begin/Endclasses switch automatically for right-to-left languages. - Fiori design rules (spacing, colours, layouts) are in the SAP Fiori design guidelines – see SAP Fiori › 01 · SAP Fiori Design & Architecture.
Part 13 – Interview questions
1. What is the difference between HTML5 and SAPUI5?
HTML5 is the markup language standard (WHATWG Living Standard) that describes page structure. SAPUI5 is SAP's JavaScript UI framework: you use its controls in XML views, and UI5 renders them into HTML and CSS in the browser.
2. What is the DOM?
The Document Object Model – the tree of objects the browser builds when it parses the HTML. Each element, attribute and text is a node. JavaScript reads and changes the page through the DOM; you can inspect it in DevTools › Elements.
3. What is the difference between <head> and <header>?
<head> holds invisible information about the page (title, meta, CSS, scripts). <header> is a visible semantic block in the body, such as the page banner with logo and title.
4. Block-level vs inline elements?
Block elements (div, p, h1, ul, table, section …) start on a new line and take the full width. Inline elements (span, a, strong, img, input …) stay in the text line and are only as wide as their content. It is the default CSS display value and can be changed.
5. Why use semantic tags?
They describe the meaning of content (header, nav, main, article, footer), which helps screen readers, search engines and other developers. A <div> carries no meaning.
6. What does the viewport meta tag do?
<meta name="viewport" content="width=device-width, initial-scale=1"> tells mobile browsers to use the real device width instead of a zoomed-out desktop width. Without it responsive layouts and UI5 on phones do not work properly.
7. What are the three ways to apply CSS, and which is best?
Inline (style attribute, one element), internal (<style> in the head, one page) and external (linked .css file, whole site). External is best: reusable, cached, one place to maintain. In UI5 it is css/style.css registered in the manifest.
8. How does CSS decide which rule wins?
The cascade: !important first, then inline styles, then specificity (ids > classes/attributes/pseudo-classes > elements), and with equal specificity the rule that comes later wins.
9. Explain the box model and box-sizing: border-box.
Every element is a box of content, padding, border and margin. With the default content-box, width covers only the content; with border-box it includes padding and border, which makes sizes predictable.
10. Flexbox or Grid – when do you use which?
Flexbox for one direction (a toolbar row, a vertical list); Grid for two dimensions (dashboards, page layouts, card tiles). In UI5: HBox/VBox/FlexBox for Flexbox, CSSGrid/GridContainer for Grid.
11. How do you make a page responsive?
Viewport meta tag, relative units (rem, %), fluid Flexbox/Grid layouts and media queries (mobile first with min-width). UI5 adds responsive controls, sap.ui.Device and the compact/cozy density classes.
12. How do you style a UI5 app without breaking upgrades?
Use the theme (or a custom theme from the Theme Designer), standard classes such as sapUiSmallMargin, and own classes added with class / addStyleClass in css/style.css, using theme parameters (var(--sapBrandColor)). Never override internal .sapM… classes or rely on !important.
13. What happens between an XML view and the HTML you see in DevTools?
UI5 parses the XML view into a tree of control objects (e.g. a sap.m.Button with its properties). Each control's renderer writes the HTML with SAP's CSS classes and an ID prefixed with the view ID; the browser builds the DOM and applies the theme CSS plus your own classes. When a property changes, UI5 updates the DOM itself. So you work with the control API (byId, binding), and treat the generated HTML as read-only output.
🏠 Start Here · 02 · JavaScript & Node.js ▶ · Sections: CORE ABAP | OOPS ABAP | ABAP on HANA | Clean Core | RAP | ABAP Points | SAP Fiori | SAPUI5 | Mobile Development (MDK) | BTP Foundations | BTP Development | CAP | SAP Build | ABAP on BTP | Integration Suite | SAP Business AI | SAP BASIS | Security | SAP SDLC
Functional: FICO ABAP | TRM ABAP | VIM | SAP BIS | SD ABAP | MM ABAP | PP ABAP | QM ABAP | PM ABAP | PS ABAP | EWM | TM ABAP | EHS ABAP | HR ABAP | BW | SAP MDG | SAP Analytics Cloud | SAP Ariba | SAP CX | SAP IBP