External CSS File

As far as we have seen in previous lessons, the CSS code was defined in the same HTML document(Download File of Examples) However we can also define a separate CSS file that can be linked to the HTML document. In this way we will be able to apply CSS to multiple HTML documents if needed without repeating CSS in each file. Moreover its also a practice to define CSS externally when developing websites, because multiple webpages might require same CSS thus making it usable for each webpage.

Get hands-on with 1200+ tech skills courses.