Role of CSS Link Selector

Giri Raju
Updated on 30-Jun-2020 11:16:36

226 Views

Use the CSS :link selector to style all unvisited links. You can try to run the following code to implement the :link selector −ExampleLive Demo                    a:link {             background-color: orange;          }                     Demo Websitehttps://www.example.com/    

Role of CSS nth-of-type(n) Selector

Chandu yadav
Updated on 30-Jun-2020 11:15:58

201 Views

Use the CSS :nth-of-type(n) selector to style every element that is the nth element of its parent. You can try to run the following code to implement the :nth-of-type(n) selectorExampleLive Demo                    p:nth-of-type(2) {             background: yellow;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.    

Fetch Domain Name from Email ID using MySQL Query

karthikeya Boyini
Updated on 30-Jun-2020 11:15:33

780 Views

Use SUBSTRING_INDEX() for this. Let us first create a table −mysql> create table DemoTable -> ( -> UserMailId varchar(100) -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John@gmail.com'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable values('Carol94844@yahoo.com'); Query OK, 1 row affected (0.25 sec)Display all records from the table using select statement −mysql> select *from DemoTable;OutputThis will produce the following output −+----------------------+ | UserMailId | +----------------------+ | John@gmail.com ... Read More

Style nth p Element of Its Parent with CSS

George John
Updated on 30-Jun-2020 11:15:07

179 Views

Use the CSS :nth-of-type(n) selector to style every element that is the nth element of its parent. You can try to run the following code to implement the :nth-of-type(n) selectorExampleLive Demo                    p:nth-of-type(2) {             background: yellow;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.    

MySQL Query to Search Record with Apostrophe

Sharon Christine
Updated on 30-Jun-2020 11:13:57

555 Views

Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (2.23 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John'); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable values('Sam\''s'); Query OK, 1 row affected (0.28 sec) mysql> insert into DemoTable values('David\''s'); Query OK, 1 row affected (0.36 sec)Display all records from the table using select statement −mysql> select *from DemoTable;OutputThis will produce the following output −+----------+ | Name | +----------+ | John ... Read More

Style Input Elements with Invalid Value Using CSS

radhakrishna
Updated on 30-Jun-2020 11:13:45

198 Views

To style all elements with an invalid value, use the CSS :invalid selector.ExampleYou can try to run the following code to implement the :invalid selector −Live Demo                    input:invalid {             background: red;          }                     Heading             The style (red color background) appears if you type an irrelevant/ invalid email address.    

Role of CSS Invalid Selector

Arjun Thakur
Updated on 30-Jun-2020 11:12:44

230 Views

Use the CSS :invalid selector to style all elements with an invalid value. You can try to run the following code to implement the :invalid selectorExampleLive Demo                    input:invalid {             background: red;          }                     Heading                    The style (red color background) appears if you type an irrelevant/ invalid email address.    

Role of CSS in Range Selector

mkotla
Updated on 30-Jun-2020 11:12:18

130 Views

Use the CSS :in-range selector to style elements with a value within a specified range. You can try to run the following code to implement the :in-range selector −ExampleLive Demo                    input:in-range {             border: 3px dashed orange;             background: yellow;          }                           The style only works for the value entered i.e. 9    

Style Links on Mouse Over with CSS

Ankith Reddy
Updated on 30-Jun-2020 11:11:46

268 Views

To style links on mouse over with CSS, use the CSS: hover selector. You can try to run the following code to implement the: hover, selector,ExampleLive Demo                    a:hover {             background-color: orange;          }                     Google       Keep the mouse cursor on the above link and see the effect.    

Role of CSS :last-of-type Selector

vanithasree
Updated on 30-Jun-2020 11:10:40

155 Views

Use the CSS :last-child selector to style every element that is the last child of its parent.ExampleYou can try to run the following code to implement the :last-child selector −Live Demo                    p:last-of-type {             background: orange;          }                     Heading       This is demo text1.       This is demo text2.       This is demo text3.    

Advertisements