Today, let us add some lists to our detailed view section by using html lists.
Lists:
List is a way to group related pieces of information, so that they are easy to read and understand.
For example:
Shopping list, To-do list…etc.
There are two types of lists:
Unordered list
ordered list
Unordered list:
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items will be marked with bullets (small black circles) by default:
Example:
<ul> <li> list item1 </li> <li> list item2 </li> </ul>
So, now let us add some points to the Mysore Palace and you need to place that code in the Mysore Palace detailed view section.
<divid="sectionmysorepalacedetailedview"> <divclass="bg-container2"> <h1class="mainheading1">Detailed View</h1> <divclass="d-flex flex-row justify-content-center"> <divclass="container-card"> <divid="carouselExampleIndicators"class="carousel slide"data-ride="carousel"> <olclass="carousel-indicators"> <lidata-target="#carouselExampleIndicators"data-slide-to="0"class="active"></li> <lidata-target="#carouselExampleIndicators"data-slide-to="1"></li> <lidata-target="#carouselExampleIndicators"data-slide-to="2"></li> </ol> <divclass="carousel-inner"> <divclass="carousel-item active"> <imgsrc="images/mysore1.jpg"class="d-block w-100"alt="..."> </div> <divclass="carousel-item"> <imgsrc="images/mysore2.jpg"class="d-block w-100"alt="..."> </div> <divclass="carousel-item"> <imgsrc="images/mysore3.jpg"class="d-block w-100"alt="..."> </div> </div> <aclass="carousel-control-prev"href="#carouselExampleIndicators"role="button"data-slide="prev"> <spanclass="carousel-control-prev-icon"aria-hidden="true"></span> <spanclass="sr-only">Previous</span> </a> <aclass="carousel-control-next"href="#carouselExampleIndicators"role="button"data-slide="next"> <spanclass="carousel-control-next-icon"aria-hidden="true"></span> <spanclass="sr-only">Next</span> </a> </div> <divclass="text-container"> <h1class="heading2">Mysore Palace</h1> <pclass="paragraph1">Mysore Palace, also known as Amba Vilas Palace, is a historical palace and a royal residence (house). It is located in Mysore, Karnataka, India. It used to be the official residence of the Wadiyar dynasty and the seat of the Kingdom of Mysore. </p> <ulclass="paragaraph1 unorderd-list"> <li>Palace Entrance Timings: Everyday from 10.00 am to 5.30 pm.</li> <li>Tickets issued for Palace Entrance between 10.00AM – 5.30 PM.</li> </ul> </div> </div> </div> </div>
And this how the unorderd list items are added.
Now let us add the styling to list items using CSS.
list style types are like circle, square, dic and none means no symbol.
.unordered-list{ list-style-type:square; }
This is how the square list type are added and in the same way you can use different list style types.
Ordered List:
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
The list items will be marked with numbers by default:
The list style types are like: upper-alpha, lower-roman, lower-alpha.
<ol> <li> list item1 </li> <li> list item2 </li> </ol>
<olclass="paragraph1 ordered-list"> <li>Palace Entrance Timings: Everyday from 10.00 am to 5.30 pm.</li> <li>Tickets issued for Palace Entrance between 10.00AM to 5.30 PM.</li> </ol>
Now let us add the styling to list items using CSS.
.ordered-list{ list-style-type:upper-alpha; }
In the same way you can use different list style types.
In the last story we have learned about how to add carousel and youtube video to the website and todaty let us Integrate all the three webpages together to form a tourism website.
In the mean time we will be learning about two HTML attributes
Onclick Attribute
id Attribute
Id Attribute:
It is used to uniquely identify the HTML elements. The value for the html attribute must me unique.
Syntax:
<div id="container1"> ... </div>
Above id is the attribute name and container is attribute value.
Onclick Attribute:
The onclick event occurs when the user clicks on an html element.
The id which we specify to any section should always contain its prefix as section and the s in the section should be always written in lower alphabet.
Example:
section1, sectionab…etc.
Integration of first two sections:
we need to add id’s to the section container and add onclick attribute to the button in the Home Section.
Integration of Home and Favourite places section:
We need to id to the home section as:
<div id="sectionHome"> ... </div>
And the content goes inbetween the id section and the onclick attribute is to be added above the closing body tag.
<buttonclass="button"onclick="display('sectionfavouriteplace')">Get Started </button>
For Example:
DOCTYPE html> <html> <head> <linkrel="stylesheet"href="back.css"> <linkrel="stylesheet"href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"crossorigin="anonymous"> <scriptsrc="https://code.jquery.com/jquery-3.5.1.slim.min.js"integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"crossorigin="anonymous"></script> <scriptsrc="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"crossorigin="anonymous"></script> <scriptsrc="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"crossorigin="anonymous"></script> <linkrel="stylesheet"href="webint.css"> </head> <body> <divid="sectionHome"> <divclass="bg-container d-flex flex-column justify-content-end"> <divclass="tourismcard"> <h1class="main-heading">Tourism</h1> <pclass="paragraph">Plan your trip wherever you want to go</p> <buttonclass="button"onclick="display('sectionfavouriteplaces')">Get Started</button> </div> </div> </div> <divid="sectionfavouriteplaces"> <divclass="bg-container1"> <divclass="heading">Favourite Places</div> <divclass="card d-flex flex-row justify-content-end"onclick="display('sectionTajMahalDetailedview')"> <div> <h1class="heading1">Taj Mahal</h1> <pclass="description1">If there was just one symbol to represent all of India, it would be the Taj Mahal.It is a masterpiece of architectural style in conception, treatment and execution and has unique aesthetic qualities in balance, symmetry and harmonious blending of various elements. Integrity is maintained in the intactness of tomb, mosque, guest house, main gate and the whole Taj Mahal complex.</p> </div> <imgsrc="images/tajmahal.jfif"class="image1"/> </div> <divclass="card d-flex flex-row justify-content-end"onclick="display('sectionGoldenTempledetailedview')"> <div> <h1class="heading1">Golden Temple</h1> <pclass="description1">The Golden temple is famous for its full golden dome, it is one of the most sacred pilgrim spots for Sikhs.The Mandir is built on a 67-ft square of marble and is a two storied structure.</p> </div> <imgsrc="images/golden.avif"class="image1"/> </div> <divclass="card d-flex flex-row justify-content-end"onclick="display('sectiontirupatidetailedview')"> <div> <h1class="heading1">Tirupati</h1> <pclass="description1">Tirupati is a city in the Indian state of Andhra Pradesh. It is the administrative headquarters of the Tirupati district. Tirupati is world-famous for Tirupati Laddu. It is the prasadam at Venkateshvara Temple, Tirumala. </p> </div> <imgsrc="images/tirupati.jfif"class="image1"/> </div> <divclass="card d-flex flex-row justify-content-end"onclick="display('sectionmysorepalacedetailedview')"> <div> <h1class="heading1">Mysore Palace</h1> <pclass="description1">Mysore Palace, also known as Amba Vilas Palace, is a historical palace and a royal residence (house). It is located in Mysore, Karnataka, India. It used to be the official residence of the Wadiyar dynasty and the seat of the Kingdom of Mysore. </p> </div> <imgsrc="images/mysore.jfif"class="image1"/> </div> </div> <buttonclass="btn btn-dark"onclick="display('sectionHome')"> back </button> </div> <scripttype="text/javascript"src="https://d1tgh8fmlzexmh.cloudfront.net/ccbp-static-website/js/ccbp-ui-kit.js"></script> </body> </html>
And this is how the the get started button takes you to the favourite places section and below is the back button which again takes you to the home section.
Integration of favourite places and detailed view section:
Now let us integrate the favourite places section and also we add the Taj Mahal detailed view section to the Taj Mahal favourite place.
The code should be added below the section favourite places and the onclick is to be added in the favourite places section.
<divid="sectionfavouriteplaces"> <divclass="bg-container1"> <divclass="heading">Favourite Places</div> <divclass="card d-flex flex-row justify-content-end"onclick="display('sectionTajMahalDetailedview')"> <div> <h1class="heading1">Taj Mahal</h1> <pclass="description1">If there was just one symbol to represent all of India, it would be the Taj Mahal.It is a masterpiece of architectural style in conception, treatment and execution and has unique aesthetic qualities in balance, symmetry and harmonious blending of various elements. Integrity is maintained in the intactness of tomb, mosque, guest house, main gate and the whole Taj Mahal complex.</p> </div> <imgsrc="images/tajmahal.jfif"class="image1"/> </div>
<divid="sectionTajMahalDetailedview"> <divclass="bg-container2"> <h1class="mainheading1">Detailed View</h1> <divclass="d-flex flex-row justify-content-center"> <divclass="container-card"> <divid="carouselExampleIndicators"class="carousel slide"data-ride="carousel"> <olclass="carousel-indicators"> <lidata-target="#carouselExampleIndicators"data-slide-to="0"class="active"></li> <lidata-target="#carouselExampleIndicators"data-slide-to="1"></li> <lidata-target="#carouselExampleIndicators"data-slide-to="2"></li> </ol> <divclass="carousel-inner"> <divclass="carousel-item active"> <imgsrc="images/tajmahal1.jpg"class="d-block w-100"alt="..."> </div> <divclass="carousel-item"> <imgsrc="images/tajmahal4.jpg"class="d-block w-100"alt="..."> </div> <divclass="carousel-item"> <imgsrc="images/tajmahal5.jpg"class="d-block w-100"alt="..."> </div> </div> <aclass="carousel-control-prev"href="#carouselExampleIndicators"role="button"data-slide="prev"> <spanclass="carousel-control-prev-icon"aria-hidden="true"></span> <spanclass="sr-only">Previous</span> </a> <aclass="carousel-control-next"href="#carouselExampleIndicators"role="button"data-slide="next"> <spanclass="carousel-control-next-icon"aria-hidden="true"></span> <spanclass="sr-only">Next</span> </a> </div> <divclass="text-container"> <h1class="heading2">Taj Mahal</h1> <pclass="paragraph1">If there was just one symbol to represent all of India, it would be the Taj Mahal.It is a masterpiece of architectural style in conception, treatment and execution and has unique aesthetic qualities in balance, symmetry and harmonious blending of various elements.</p> </div> </div> </div> <buttonclass="btn btn-dark"onclick="display('sectionfavouriteplaces')"> back </button> </div> </div>
And this how the detailed view section opens when tou click on the Taj Mahal in favourite places section and back button is added in detailed view section to go to favourite places section.
In the next story let us learn how to add multiple carousel.