Last Updated : Jan 1, 2023
And there are many types of conditional statements are one from them is if statement.
In previous articles we come in touch with types of conditional statements and basic if statement also.
In today’s article we will understand about if statement with multiple conditions. Let us understand.
As, there are many ways with the help of which we can use multiple conditions in if statement.
Let us see the code below.
- First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
- Secondly, the <html> tag is used to indicate the beginning of an HTML document.
- As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title.
- Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
- Here, first of all before closing head we link a file there with the help of script tag. That file is of jQuery file.
- You can link cdn and download file and give reference with help of script tag.
- Inside script tag, which is a paired tag. Here, we use or create two if statements.
- And inside if statement we have to write the code which we want to print if the condition inside if is true.
- You can see the if statement with multiple condition in our codes. You can use any condition inside if.
- Here we use basic AND and OR condition. You can use any and replace this code. We hope that you understand this code properly.
- At last, the <body> and <html> tags are closed with </body> and </html> respectively.