A JSP tag is a tag that you can embed in your JSP page just like regular HTML tags (e.g., the <table> tag). However, your JSP tag is not sent to the browser. Instead, it is evaluated by the JSP engine on the server side. The output of your tag is inserted into the page at the location where the tag was embedded.
Three Reasons to Create JSP Tags
JSP tags allow you to move complicated code out of your JSP file.
JSP tags allow you to write code once and use it in many JSP files.
JSP tags are written in Java so you have access to better control statements and generate more efficient code.
A simple example
To create a tag that converts its text argument to uppercase, the JSP file looks like this: