* {
border: 1px dotted black;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li> List Item 3</li>
<li> List Item 4</li>
</ul>
</div>
#container {
background: #e3e3e3;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li> List Item 3</li>
<li> List Item 4</li>
</ul>
</div>
.error {
color: red;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li class="error">Something went Wrong </li>
<li> List Item 4</li>
</ul>
</div>
li a {
color: red;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li><a>Something went Wrong</a> </li>
<li> List Item 4</li>
</ul>
</div>
div{ border: 1px solid; }
ul { padding-left: 20px; }
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li><a>Something went Wrong</a> </li>
<li> List Item 4</li>
</ul>
</div>
a:link { color: red; }
a:visted { color: purple; }
<div id="container">Lorem ipsum dolor
sit amet, consectetur <a href="#">
adipisicing</a> elit, sed do eiusmod
<a href="http://net.tutsplus.com">
tempor</a> incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.
</div>
ul + p {
color: red;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item </li>
<li> List Item </li>
<li> List Item </li>
<li> List Item </li>
</ul>
<p> Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor. </p>
<p> Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor. </p>
</div>
div#container > ul {
border: 1px solid black;
}
<div id="container">
<ul>
<li> List Item
<ul>
<li> Child </li>
</ul>
</li>
<li> List Item </li>
<li> List Item </li>
<li> List Item </li>
</ul>
<p> Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor. </p>
</div>
ul ~ p {
color: red;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item
<ul>
<li> Child </li>
</ul>
</li>
<li> List Item </li>
</ul>
<p> Lorem ipsum dolor sit amet. </p>
<p> Lorem ipsum dolor sit amet. </p>
<div>
<p> Lorem ipsum dolor sit amet. </p>
</div>
<p> Lorem ipsum dolor sit amet. </p>
</div>
a[title] {
color: green;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li><a title="wrong">Something went Wrong</a> </li>
<li> List Item 4</li>
</ul>
</div>
a[href="http://www.ecartstudio.com"] {
color: #ff0000; /* ecartstudio red */
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li>
<a href="http://www.ecartstudio.com">Ecart</a>
</li>
<li> List Item 4</li>
</ul>
</div>
a[href*="ecart"] {
color: #ff00ff; /* ecartstudio pink*/
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li> List Item 2</li>
</ul>
<ul>
<li>
<a href="http://www.ecartstudio.com">Ecart</a>
</li>
<li> List Item 4</li>
</ul>
</div>
a[href^="ecart"] {
color: #ff8800; /* ecart html orange*/
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li>
<a href="ecartstudio.html">Ecart HTML</a>
</li>
</ul>
<ul>
<li>
<a href="http://www.ecartstudio.com">Ecart</a>
</li>
<li> List Item 4</li>
</ul>
</div>
a[href$=".html"] {
color: #00bbff; /* ecartstudio bluesky*/
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li> List Item 1</li>
<li>
<a href="ecartstudio.html">Ecart HTML</a>
</li>
</ul>
<ul>
<li>
<a href="http://www.ecartstudio.com">Ecart</a>
</li>
<li> List Item 4</li>
</ul>
</div>
a[href$=".jpg"],
a[href$=".jpeg"],
a[href$=".png"],
a[href$=".gif"] {
color: red;
}
<a href="path/to/image.jpg" data-filetype="image"> Image Link </a>
a[data-type="image"] {
color: red;
}
<div id="container">
<p> My paragraph here. </p>
<ul>
<li>
<a href="lims.jpg" data-type="image">Ecart LIMS</a>
</li>
<li>
<a href="ecartstudio.png" data-type="image">Ecart HTML</a>
</li>
</ul>
<ul>
<li>
<a href="www.ecartstudio.com" data-type="link">Ecart</a>
</li>
<li>
<a href="zoclose.gif" data-type="image">Ecart Zoclose</a>
</li>
</ul>
</div>