CSS 기본기

HTML Ul Li태그 앞에 기호 없애기(Ul CSS no bullets)

쿠키는 서비스 2023. 4. 20. 09:27
반응형
ul.no-bullets {
  list-style-type: none; /* Remove bullets */
  padding: 0; /* Remove padding */
  margin: 0; /* Remove margins */
}

 

<!DOCTYPE html>
<html>
<head>
<style>
ul.no-bullets {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
</style>
</head>
<body>

<p>Default list:</p>
<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Coca Cola</li>
</ul>

<p>Remove bullets, margin and padding:</p>
<ul class="no-bullets">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Coca Cola</li>
</ul>

</body>
</html>

결과

 

Default list:

  • Coffee
  • Tea
  • Coca Cola

Remove bullets, margin and padding:

Coffee

Tea

Coca Cola

반응형