I'm only just learning WP theme development so this may be a very stupid question, but I have noticed there are different ways to link to the main stylesheet from the
<?php bloginfo('stylesheet_url');?> <?php echo get_stylesheet_uri(); ?>
enqueue styles via a function and
add_action hook in
These are the ones I have come across so far.
What is the difference between them? They seem to do the same thing to me but I have read that registering and enqueueing styles via
functions.php is the preferred way. Why?