Process Overview
CSS (Cascading Style Sheets) is used to add colors, fonts, layouts, and spacing to web pages. It works by selecting HTML elements and applying style rules to change how they look.
Jump into concepts and practice - no test required
CSS (Cascading Style Sheets) is used to add colors, fonts, layouts, and spacing to web pages. It works by selecting HTML elements and applying style rules to change how they look.
HTML Document
|
|-- <head>
| |-- <link rel="stylesheet" href="styles.css">
|
|-- <body>
|-- <h1>Title</h1>
|-- <p>Paragraph text</p>
CSS File (styles.css)
|
|-- body { background-color: lightblue; font-size: 16px; }
|-- h1 { color: darkblue; }
|-- p { color: black; }
p { background-color: yellow; }h1 { font-size 20px; color: red }<li> items inside a <ul> with a green font and 18px size, but only if they have the class highlight. Which CSS selector and properties will achieve this?li elements with class highlight inside ul. The selector should be ul li.highlight.color: green; and font-size: 18px; correctly style font color and size.