6. Basic Use of Div
Div is block element
What is Div Tag
The Div tag is multi-purpose – you can use it to do several things on a web page.
You'll mostly use it in web layouts and CSS art, but it's super flexible.
Ultimately, you'll almost always to use it to style whatever it contains or manipulate such things with JavaScript
1. Use div in Web Layouts
You'll primarily use the div tag to group similar content together so you can style it easily. A great example o
f this is using div to group different sections of a webpage together. You can put together the header, nav, s
ections, and footer of a page in an individual div tag so they can be styled together.
2. Use div in CSS Art
With the div tag, you can make various shapes and draw anything because it is easy to style.
How to make a square with the div tag
To make a square with div tag, you first need to define an empty div tag and attach a class attribute to it
in the HTML. In the CSS, select the div with the class attribute, then set an equal height and width for it
.
23. Updation Query
Use for modify data from database through query
Update Query ?
The UPDATE statement is used to change or modify the existing records in a database table. This statement is typically use
d in conjugation with the WHERE clause to apply the changes to only those records that matches specific criteria.
The basic syntax of the UPDATE statement can be given with:
Let's make a SQL query using the UPDATE statement and WHERE clause, after that we will execute this
query through passing it to the PHP mysqli_query() function to update the tables records. Consider the following
persons table inside the demo database
24. Example
Let us consider the following table “Persons” with four columns ‘ Id ‘, ‘ first_name ‘, ‘ lastna
me ‘ and ‘ Email ‘.
To update the record of the Persons whose ID is 201 from the ‘ team ‘ table, the followi
ng code can be used.
28. What is Delete Query
Delete Query
The DELETE query is used to delete records from a database table.
It is generally used along with the “Select” statement to delete only those records that
satisfy a specific condition.
Syntax :
29. Example
Let us consider the following table “Data” with four columns ‘ ID ‘
, ‘ FirstName ‘, ‘ LastName ‘ and ‘ Age ‘.
To delete the record of the person whose ID is 201 from the ‘ Data ‘ table, the followi
ng code can be used.