replace "\n" woth "<br>" doesnt give newline in html code example Example: html put newline in text with \n white-space: pre-line;