Every element in CSS has a default display value and we can easily change. This is dene by explicity setting the display property value. Let us see an example wherein we are setting inline display property value for horizonatal menus −
Example
<!DOCTYPE html> <html> <head> <style> p { background-color: orange; color: white; } li { display: inline; } </style> </head> <body> <h2>Tutorials List</h2> <p>Following are the list of resources:</p> <ul> <li><a href="https://www.tutorialspoint.com/machine_learning/index.htm" target="_blank">Machine Learning</a></li> <li><a href="https://www.tutorialspoint.com/python_data_science/index.htm" target="_blank">Python Data Science</a></li> <li><a href="https://www.tutorialspoint.com/python/index.htm" target="_blank">Python</a></li> <li><a href="https://www.tutorialspoint.com/csharp/index.htm">C#</a></li> <li><a href="https://www.tutorialspoint.com/artificial_intelligence/index.htm" target="_blank">Artificial Intelligence</a></li> </ul> </body> </html>