► Style definitions are ordinarily written in external .css files. We call these stylesheets, and we link them to our HTML file using a link tag.
External stylesheets allow us to change the look of an entire website, rather than a single web page in a single file.
There are other ways to include CSS in our projects, and in this video, we will also look at two additional ways to get our CSS and HTML working together.
These are including our CSS inline with HTML elements - inside the opening tags, and also adding CSS internally inside an HTML file, enclosed inside style tags.
► Timestamps:
0:00 Start
1:10 Getting the files
1:38 Live Server
1:55 Using CSS inline
2:58 Inline styles
4:26 The downsides to inline styles
5:02 Adding multiple properties inline
5:32 More limitations of inline styles
6:30 Other options for including CSS
6:55 Internal styles using the style tag
8:05 The benefits of internal styles over inline styles
8:43 Why isn’t internal CSS ideal? (Separation of concerns & multi-page sites)
10:20 A better way: External CSS
12:13 The link tag
14:03 Looking over a simple CSS file (selectors & properties)
14:53 An HTML file can link to multiple stylesheets
15:27 Using link to add a Google font
16:47 Summary
► Get the code:
https://github.com/craigabourne/css-i...
► Links used in the video:
https://fonts.google.com/
► This video is part of the CSS for Absolute Beginners playlist: • CSS for Absolute Beginners
► Social Media:
/ craigabourne
/ craigabourne
► Code & Projects:
https://github.com/craigabourne
https://codepen.io/craigabourne
Смотрите видео Inline vs Internal vs External CSS онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Craig A. Bourne 05 Май 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,312 раз и оно понравилось 126 людям.