I am new to HTML and learning it from w3schools. I am looking at an object tag and trying to display a PDF in a browser. I can not understand why the height attribute does not work below the code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>try here</title> </head> <body> <object data="redBus_Ticket_25718916.pdf" type="application/pdf" height="100%" width="100%">sample</object> </body> </html>
I expect the whole page to be a PDF document. but i see

Can someone tell me the reason for this behavior?
I wonder when I delete the definition, it works as expected. I donβt know how they are connected. Please help me in understanding the behavior.
source share