These are use in ruby on rails :-
<% %> :-
The <% %> tags are used to execute Ruby code that does not return anything, such as conditions, loops or blocks. Eg :-
<h1>Names of all the people</h1>
<% @people.each do |person| %>
Name: <%= person.name %><br>
<% end %>
<%= %> :-
use to display the content .
Name: <%= person.name %><br>
<% -%>:-
Rails extends ERB, so that you can suppress the newline simply by adding a trailing hyphen to tags in Rails templates
<%# %>:-
comment out the code
<%# WRONG %>
Hi, Mr. <% puts "Frodo" %>