Example: Inline styles and style sheets
In this example, the internal style sheetA collection of styling rules within a document. has priority since it appears after the external style sheetA collection of styling rules in a separate file.. Edit the HTML file to put the link elementAn element used to create a link between a document and an external resource. for the external style sheet after the internal style sheet and see how the page changes.
Notice that the first paragraph remains purple, as the inline style has higher priority.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
p {
color: red;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX