Mentioning the formality of your wedding to your guests is always a great idea. Everyone appreciates a heads up when it comes to attire. There are a few ways to do this and choosing one that fits your day and style is important!
On your invitation- Simply including, "Black tie optional" or "Semi-formal attire is requested", on your invitations is perfect. The only time including dress requirements on the invitations is truly necessary is when it's a formal event.
On your info card- You have a little more flexibility with making it casual or funny when you include dress requirements on an extra insert sent with your invitations. If you're having an outdoor wedding and you're looking for a way to inform your guests to be a little more casual you could try something like, "The ceremony & reception will be in the sand; choose your footwear accordingly." Or some brides have fun with statements like, "Anything goes just please don't wear a wedding dress".
On your website- Choosing to include what you'd like your guests to wear on your website should only be done for more casual weddings. Since not all your guests will visit your website, if you're having a black tie event it is much better to inform everyone on your invitation.