CHAPTERSIX
Be focused and you will archive alot. choose your ON CSS
Explore moreBe focused and you will archive alot. choose your ON CSS
Explore moreLorem ipsum dolor sit amet consectetur adipisicing elit. Hic odit rem dolorum molestiae fugit deserunt exercitationem recusandae, itaque ratione harum sit repellat dolor temporibus deleniti non voluptatem nostrum quas? Cumque veniam, molestias id natus pariatur dolores aut nemo iure facilis expedita, temporibus exercitationem ullam ex officiis reiciendis quaerat enim consequuntur.
Selectors define which HTML elements should be styled. Understanding selectors is crucial for writing effective CSS. Here are the main types:
the class selector here is .hello
the id selector here is #hello
the selector here is p
These selectors style elements based on parts of their attribute values.
example: in the example bellow: The first link turns green, and the second turns red.
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> a[href^="https"] { color: green; } a[href$=".pdf"] { color: red; } </style> </head> <body> <a href="https://example.com">This link is green.</a> <a href="document.pdf">This link is red.</a> </body> </html>
CSS combinators allow you to target elements based on their relationship to
other elements.
General Sibling Selector (~)
Styles all sibling elements that come after a specified element.
Example: in the exmaple bellow:
Every <p> following <h2> is affected.
/CSS FILE**/
h2 ~ p {
color: purple;
}
<!-- html file -->
<h2>Title</h2>
<p>This paragraph turns purple.</p>
<p>This one too.</p>
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> li:nth-child(odd) { background-color: lightgray; } </style> </head> <body> <ul> <li>Item 1 (gray)</li> <li>Item 2</li> <li>Item 3 (gray)</li> <li>Item 4</li> </ul> </body> </html>
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