I want to create a Web page with a Description list element (dl dt dd element ).
Which widget should I use?
If I use an "HTML element widget" to create a description list, I cannot set the Styleclass.
I would like to create the following web page.
To build a semantic <dl><dt><dd> description list in ODC and still be able to style it, use HTML Element widgets for the tags and apply classes via their Attributes property (not Style Classes).
<dl><dt><dd>
OutSystems doesn’t ship a dedicated “Description List” widget; the way to do it is:
Outer container (optional)
Style Classes
description-list-wrapper
<dl> element
<dl>
dl
class
"description-list"
If(IsSomething, "description-list highlighted", "description-list")
Each item (<div><dt><dd></div>) For each “row” (Name, Gender, etc.):
<div><dt><dd></div>
Inside the dl HTML Element, drag a Container or Div widget (this will be your <div> wrapper).
<div>
description-item
Inside that container:
<dt>
dt
"Name"
"description-term"
<dd>
dd
Person.Name
"description-detail"
Styling
Put your CSS in the theme or the screen’s stylesheet, e.g.:
.description-list { margin: 0; padding: 0; } .description-item { display: flex; gap: 8px; margin-bottom: 4px; } .description-term { font-weight: 600; min-width: 120px; } .description-detail { color: #666; }
Key point: The HTML Element widget does not use Style Classes, but you can assign CSS classes by adding a class attribute in its Attributes property. That’s the supported way to style custom tags like dl, dt, and dd. Using styles
Hi You can use the outsystem widget text area widget for your requirment
Thank you for the answer.
Sorry for the confusion. The attached image is not the browser screen of the created app, but the expected value of the HTML source of the created app.