Css Tutorial

CSS :first-child Selector

HTML Code <!DOCTYPE html><html><head><style>p:first-child {background-color: yellow;}</style></head><body> <p>This paragraph is the first child of its parent (body).</p> <h1>Welcome to My Homepage</h1><p>This paragraph is not the first child of its parent.</p> <div><p>This paragraph is the first child of its parent (div).</p><p>This paragraph is not the first child of its parent.</p></div> </body></html> HTML View This paragraph is the…

CSS :enabled Selector

HTML Code <!DOCTYPE html><html><head><style> input[type=text]:enabled {background: #ffff00;} input[type=text]:disabled {background: #dddddd;}</style></head><body> <form action=””>First name: <input type=”text” value=”Mickey”><br>Last name: <input type=”text” value=”Mouse”><br>Country: <input type=”text” disabled=”disabled” value=”Disneyland”></form> </body></html> HTML View First name: Last name: Country: If you want to join my online or offline graphic designing course than just call me – 9334029817

CSS :disabled Selector

HTML Code <!DOCTYPE html><html><head><style> input[type=text]:enabled {background: #ffff00;} input[type=text]:disabled {background: #dddddd;}</style></head><body> <form action=””>First name: <input type=”text” value=”Mickey”><br>Last name: <input type=”text” value=”Mouse”><br>Country: <input type=”text” disabled=”disabled” value=”Disneyland”></form> </body></html> HTML View First name: Last name: Country: If you want to join my online or offline graphic designing course than just call me – 9334029817

CSS :checked Selector

HTML Code <!DOCTYPE html><html><head><style> input:checked {height: 50px;width: 50px;}</style></head><body> <form action=””><input type=”radio” checked=”checked” value=”male” name=”gender”> Male<br><input type=”radio” value=”female” name=”gender”> Female<br><input type=”checkbox” checked=”checked” value=”Bike”> I have a bike<br><input type=”checkbox” value=”Car”> I have a car </form> </body></html> HTML View Male Female I have a bike I have a car If you want to join my online or offline…

CSS :active Selector

HTML Code <!DOCTYPE html><html><head><style>a:active {background-color: yellow;}</style></head><body> <a href=”http://rinectar.com/”>rinectar.com</a><a href=”http://www.wikipedia.org”>wikipedia.org</a> <p><b>Note:</b> The :active selector styles the active link.</p> </body></html> HTML View w3schools.com wikipedia.org Note: The :active selector styles the active link. If you want to join my online or offline graphic designing course than just call me – 9334029817

CSS ::first-line Selector

HTML Code <!DOCTYPE html><html><head><style>p::first-line {background-color: yellow;}</style></head><body> <h1>WWF’s Mission Statement</h1><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not…

CSS ::first-letter Selector

HTML Code <!DOCTYPE html><html><head><style>p::first-letter {font-size: 200%;color: #8A2BE2;}</style></head><body> <h1>Welcome to My Homepage</h1> <p>My name is Donald.</p><p>I live in Duckburg.</p><p>My best friend is Mickey.</p> </body></html> HTML View Welcome to My Homepage My name is Donald. I live in Duckburg. My best friend is Mickey. If you want to join my online or offline graphic designing course than…

Open chat