Highlight or color the section of code in textarea

Hi, I want to color the section of code in textarea, let say line number 10 to line number 15.
I tried : editor.addLineClass(10, ‘background’, ‘styled-background’) , but it only highlight line no.10.
Also I tried: editor.markText({line: 10, ch: 0}, {line: 16, ch: 0}, {className: “styled-background”}); but it highlight only text, not highlighting the whole line.

Please suggest me some relevant method to highlight between the section of lines.

Call addLineClass five times, for the lines you want to highlight.