Wordpress PHP语法循环很奇怪

I am having trouble understanding this code. I get the basics of the 'wordpress-loop' but I dont understand what some of this syntax. It almost looks like a ternary operator.

        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

            <h1><?php the_title() ;?></h1>  
            <?php the_content(); ?>

        <?php endwhile; else: ?>

            <p>Sorry, this page does not exist</p>

        <?php endif; ?>

Specifically this line..

   <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

It is saying OK If there are posts, while we have posts, show the post? But what do the :'s signify.

It's PHP alternative syntax for control structures:

PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.

Example:

if (condition) : 

endif;

is the same as:

if (condition) {

}

Specifically, WordPress is saying: if we have posts, loop through each post, and get the post.

Here is an indented version to be clear:

    <?php if ( have_posts() ) : ?>
        <?php while ( have_posts() ) : ?>
            <?php the_post(); ?>

            <h1><?php the_title() ;?></h1>  
            <?php the_content(); ?>

        <?php endwhile; ?>
    <?php else: ?>

        <p>Sorry, this page does not exist</p>

    <?php endif; ?>

http://php.net/manual/en/control-structures.alternative-syntax.php

PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.