1.
Example code:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <style>5 H1{6 text-align:Center;7 }8 </style>9 </Head>Ten <Body> One <H1>Bookyourhotel</H1> A <ul> - <Li><ahref= "html5-2/images/background. jpg">About Us</a></Li> - <Li><ahref= "html5-2/images/background 1.jpg">Rooms</a></Li> the <Li><ahref= "html5-2/images/background 2.jpg">Facilities</a></Li> - <Li><ahref= "html5-2/images/background 3.jpg">Contact Us</a></Li> - </ul> - <HR> + <H3>Welcome to the Home page</H3> - <P>Bookyourhotel welcome you with your warmth and a feeling so each quest is truly special. It offers a cozy and intimate experience amidst the glitz and glamour of South America.our caring and courteous staffs is Ever eager to ensure, all individual needs is cared for with professional expertise and a personal touch.</P> + <P>The rooms has been designed with different floor plans to create ensuite bathrooms.</P> A at </Body> - </HTML>
Test results:
2.
Only immediately after the <div> behind the <p> logo will turn blue
Example code:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <style>5 div+p{Background-color:Blue;}6 </style>7 </Head>8 <Body>9 <H1>Welcome to the page.</H1>Ten <Div> One <P>This is Pagagraph 1</P> A </Div> - <P>This is Pagagraph 2</P> - the <P>This is Pagagraph 3</P> - </Body> - </HTML>
Test results:
HTML 5--grouping and Nesting Styles