asked 14.5k views
5 votes
How does the web page know what stylesheet it should be using?

1 Answer

8 votes

Answer:

To add an external stylesheet to a web page, use the <link> tag, providing the URL of the style sheet in the href attribute, as well as rel="stylesheet" . For the following example, I've taken the styles from the above (embedded) example, moved them to an external style sheet, then linked to that file.

answered
User Fpierrat
by
8.0k points