CHAPTERTHREE
Be focused and you will archive alot. choose your ON CSS
Explore moreBe focused and you will archive alot. choose your ON CSS
Explore moreas we discussed on our last sertion you can use tag name selector, id selector and grouping selector
You can group multiple selectors with a comma, reducing duplicate code.
The ID selector #special applies styles the tag with an id of special
* Only elements with class="highlight" will have a yellow background.
The universal selector (*) applies styles to all elements.
Understanding the CSS Structure
A CSS rule consists of three main parts:
Example:
* { margin: 0; padding: 0; }
This removes default margins and padding from every element on the page.
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> div p { color: green; } </style> </head> <body> <div> <p>This paragraph inside a div will begreen.</p> </div> </body> </html>
The child selector (>) targets direct children of an element.
Example:
div > p { color: purple; }
* Only <p> elements directly inside <div> elements will be styled.
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> h1 + p { font-style: italic; } </style> </head> <body> <p >thisis a paragraph</p> <h1>this is a heading</h1> </body> </html>
thisis a paragraph
vildash network team has had alot of impact on others but here are the vildash network team testimonies and expirience while working with the team
you can now connect and text other users from our database. you just neeed to click bellow to message them
WE HAVE CODE EDITORS FOR LANGUAGES LIKE C, C#, C++, HTML, CSS, javascript, JAVA VISUAL BASIC
We dont just teach you to code we teach you to code and build amazing systems.we are group of expert who wants to promote our field of studies