HTML – Lists – Styling

Previous
Next

HTML Lists – The Style Attribute:

  • Style object providing list of attributes to apply styles to lists.
  • The following table shows how to represent unordered lists with style object.
  •  
StyleDescription
list-style-type : discThe list items will be marked with bullets (default)
list-style-type : circleThe list items will be marked with circles
list-style-type : squareThe list items will be marked with squares
list-style-type : noneThe list items will not be marked
<!DOCTYPE html>
<html>
	<body>
		<h2>Web techologies</h2>
		<ul style="list-style-type:disc">
			<li>HTML</li>
			<li>CSS</li>
			<li>JavaScript</li>
		</ul>  
		<h2>Languages</h2>
		<ul style="list-style-type:circle">
			<li>Java</li>
			<li>Python</li>
			<li>Dot Net</li>
		</ul>  
	</body>
</html>
Previous
Next

Courses Enquiry Form