I want to know if someone knows my session id from HTML source, then they can hack my site?

For example, if i set a class in html like this `<div class="class<?php echo session_id(); ?>"></div>`

Then the HTML source code (that can be viewed from the browser) wil be `<div class="class78345543545c344x"></div>`

Is it risk?