Here, we will introduce you about the use and implementation of the <code> tag in html document. This tag is used for representing the programming code in to the html document in the font of computer code text. The text within the <code> tag is marked up with the surrounding.
The <code> tag represents the programming code and program outputs in the computer code font style in the html document. This tag have both start and end tag.
| <code>Your Code Here</code> |
Example: Codetag.html.
| <!DOCTYPE html> <html> <head> <title>Example of code tag</title> </head> <body> <b>This is the code tag Example:</b><br> <code> <blockquote> String str=new String("Gyan");<br> System.out.println(str); </blockquote> </code> </body> </html> |
Output:
Difference between HTML5 and HTML4.01
There is no difference with the html4 version and don't have any element specific attribute.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.