Question: I'm trying to print below line on html page:

```
List<Map<String,Object>> someVar = someMethod();

```

however, in html `Map<String,Object>` is being treated as tag in html

Below is the output I'm getting:

```
List> someVar = someMethod();

```

everything else other than Map is being properly replaced by span tags

![enter image description here](https://i.stack.imgur.com/8E9M5.png)

Answer: 
replace `<` by `&lt;` and `>` by `&gt;`

```
List&lt;Map&lt;String,Object&gt;&gt; someVar = someMethod();

```
try inserting \r right after the <

`<script>
document.write("List <\rMap<\rString,Object>> someVar = someMethod();");
</script>`

the result I got was: List < Map< String,Object>> someVar = someMethod();