(soft music)…- [Instructor] A good practice when actually working…with HTML and styling it with CSS,…is to decouple the styles from the actual elements…and the style attribute.…And actually move those style declarations…to a style sheet where we use CSS selectors…to connect the style declarations…to the elements which are being styled.…Now there are several ways to do this.…
One way of doing it is…to use something called the style element.…The style element goes into the HTML documents,…so we're still not benefiting from caching.…But it does allow us to actually extract the style sheet out…of the HTML elements of the page…and put all of the styled declarations in the CSS selectors,…up into a style sheet inside of the style element…which is typically in the head part of the page.…And it does allow us to do some decoupling…of the styles from those elements…and even be able to override those styles…with other style sheets.…
This is still not a recommend way to do your styling,…but it is an option.…In fact you will see the style element being used…
Share this video
Embed this video
Video: External CSS