Let us first create a table −mysql> create table DemoTable -> ( -> StudentId varchar(100) -> ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John19383'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values('Carol9999'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values('David123456'); Query OK, 1 row affected (0.15 sec)Display all records from the table using select statement −mysql> select *from DemoTable;OutputThis will produce the following output −+-------------+ | StudentId | +-------------+ | John19383 ... Read More
To style every element that has no children with CSS, use the: empty selector t. You can try to run the following code to implement the: empty selectorExampleLive Demo p.demo { width: 300px; height: 20px; background: gray; } p:empty { width: 150px; height: 20px; background: orange; } This is demo text. Below is empty text.
Use the CSS :empty selector to style every element that has no children with CSS. You can try to run the following code to implement the :empty selector −ExampleLive Demo p.demo { width: 300px; height: 20px; background: gray; } p:empty { width: 150px; height: 20px; background: orange; } This is demo text. Below is empty text.
To select month and year in MySQL, you can use MONTH() and YEAR() method. Let us first create a table −mysql> create table DemoTable -> ( -> DueDate datetime -> ); Query OK, 0 rows affected (0.90 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2019-01-21'); Query OK, 1 row affected (0.22 sec) mysql> insert into DemoTable values('2019-06-15'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values('2018-12-01'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable values('2015-04-01'); Query OK, 1 row affected (0.16 sec) ... Read More
Use the CSS :first-of-type selector to style every element that is the first element of its parent with CSS.ExampleYou can try to run the following code to implement the :first-of-type selectorLive Demo p:first-of-type { background: orange; } This is demo text1. This is demo text2.
Use the CSS :first-child selector to style every elements that is the first child of its parent.ExampleYou can try to run the following code to implement the :first-child selectorLive Demo p:first-child { background-color: orange; } Heading This is demo text. This is demo text, with the first child of its parent div. This is demo text, but not the first child.
The position: absolute; property allows you to position element relative to the nearest positioned ancestor.ExampleYou can try to run the following code to implement CSS position: absolute;Live Demo div.one { position: relative; width: 500px; height: 150px; border: 2px solid blue; } div.two { position: absolute; top: 70px; right: 0; width: 300px; height: 50px; border: 2px solid yellow; } position: absolute; The position: absolute; property allows you to position element relative to the nearest positioned ancestor. div has position: relative; div has position: absolute;
Let us first create a table −mysql> create table DemoTable -> ( -> Number int -> ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable values(20); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values(12); Query OK, 1 row affected (0.22 sec) mysql> insert into DemoTable values(14); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values(19); Query OK, 1 row affected (0.14 sec) ... Read More
To style every enabled element, use the CSS :enabled selector.ExampleYou can try to run the following code to style enabled elementLive Demo input:enabled { background: blue; } Subject Student: Age:
The selectors in CSS are patterns to select the element to style.Let us see the key selectors in CSS −SelectorDemoDescription class.demoSelects all elements with class="demo"#id#myidSelects the element with id="myid"**Used to select all the elements
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP