• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

HTML5 Small Tag

March 18, 2014 //  by Krishna Srinivasan//  Leave a Comment

The <small> tag was earlier (before HTML5) was used to display the text in smaller size in the output. The texts which is written between the start and end tag of <small> element will be displayed smaller in the output. Since HTML5 its been used to also display the side comments.

Hence a <small> tag can be used to display text in small size and also to display side comment and print text. We should use <small> only on inline content. It should not be used only to display a text in smaller size, for such cases its a better idea to use CSS styling. A common example for inline texts are copyright statement in a page footer, a disclaimer, or licensing information. In brief, small element emphasis more on the inline comments rather than the smaller text.

The Syntax of the <small> Tag

<small> body content </small>

Browser Suport

All major browsers support <small> tag.

HTML5 Small Tag Example

<!DOCTYPE html>
<html>
<head>

<title>Small element </title>

</head>
<body>
<div style="width:500px;text-align:justify">
    <p> "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
     eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
    veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
    dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
    sunt in culpa qui officia deserunt mollit anim id est laborum</p>
   <small>Copyright 2014 <a rel="license" href="https://javabeat.net">JavaBeat</a></small>
  </div>
</body>
</html>

In the above example we can see that we have used <small> tag to display the copyright message.

Example Application Test

  • Save the file as small_example.html in your system.
  • Just open the file in the browser, you will see the below picture in the browser. Note that the browser must support HTML5 specification.

Output

When the execution process is completed successfully we will get the following output :
HTML5 Small Element

Category: HTMLTag: HTML5

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Previous Post: « System.gc Invocation For Garbage Collection
Next Post: Spring Test MVC HtmlUnit 1.0.0.M1 Release »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

New Features in Spring Boot 1.4

Difference Between @RequestParam and @PathVariable in Spring MVC

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact