Page caption

Types of page caption:

Simple caption Link

Simple page caption is defined via img alt attribute and can be used on single photo pages only:

<img src="photo-1.jpg" alt="Photo caption #1"/>
<img src="photo-2.jpg" alt="Photo caption for second page"/>
<img src="photo-3.jpg" alt="Another simple photo caption"/>

Content of alt attribute is used as page caption but it's also used as thumb caption for that photo page.

Rich caption Link

For rich html page caption use .caption element right after your project page element:

<!--  photo page with rich html caption  -->
<img data-src="photo.jpg" alt="This is simple caption"/>
<div class="caption">This is <strong>rich html</strong>caption</div>
    

Good to know about rich caption element:

  • Caption element can be any html element with class caption.
  • Caption element can contain any html code block.
  • Simple caption defined with alt attribute will be ignored if caption element is present.
  • Text content of caption element will be used as thumb caption.
  • Caption element will not be parsed as project page.

Caption element must immediately follow page element in order to be associated with particular inner page.

× × ×

Learn next: Introduction