HTML – unordered lists

Previous
Next

Unordered Lists:

  • An unordered list is a collection of elements
  • Each element marked with a bullet(a default symbol)
  • This list is created by using HTML <ul> tag.
<!DOCTYPE html>
<html>
	<body>
		<h2>Unordered List with Default Bullets</h2>
			<ul>
				<li>HTML</li>
				<li>CSS</li>
				<li>JavaScript</li>
			</ul>  
	</body>
</html>

The type Attribute:

  • You can use type attribute for <ul> tag to specify the type of bullet you like.
  • By default it is a disc.
  • Following are the possible options:
    • <ul type=”square”>
    • <ul type=”disc”>
    • <ul type=”circle”>

Following is an example where we used <ul type=”square”>

<!DOCTYPE html>
<html>
	<body>
		<ul type="square">
			<li>Beetroot</li>
			<li>Ginger</li>
			<li>Potato</li>
			<li>Radish</li>
		</ul>
	</body>
</html>
Previous
Next

Courses Enquiry Form