Line break using
and not

478    Asked by DylanPowell in Salesforce , Asked on Jul 27, 2021

I am trying to get a line break so the result would be like normal text just changing a line not paragraph.I am using and but I still get spaces like a paragraph between my lines. A snippet of my code is :

{!$User.CompanyName}
{!$User.Street}
{!$User.City}
{!$User.Country}
Tel : {!$User.Phone}
Fax : {!$User.Fax}
Email : {!$User.Email}

and the outcome is spaces between the lines

Any ideas on how to overcome this?

Answered by Hellen Cargill

The
tag is an empty tag, which means it doesn't have an end tag. A single
tag represents a single line break.

What you're doing by adding opening and 'closing' tags like you have is creating 2 line breaks instead.

The following should achieve what you want:

{!$User.CompanyName}
{!$User.Street}
{!$User.City}
{!$User.Country}
Tel : {!$User.Phone}
Fax : {!$User.Fax}
Email : {!$User.Email}



Your Answer

Interviews

Parent Categories