0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

初心者による自分のためメモ ~HTML_リスト要素編~

0
Last updated at Posted at 2025-06-16

はじめに

こんにちは。プログラミング学習中の大学生です。
今回は、HTMLのリスト要素についてまとめたいと思います。

前回の記事:初心者による自分のためメモ ~HTML_構成編~

url: https://qiita.com/Ryoga_Eve/items/76abef0458c0aa7e6aa6

リスト要素

リスト要素には順序のないリスト要素である<ul>と、順序のあるリストである<ol>がある。
各要素の中には<li>要素を入れる。これはリストの中身の要素である。

<ul>順序なしリスト要素

・C
・C++
・python
のように、順序のないリストを表す要素である。

<ul>
    <li>C</li>
    <li>C++</li>
    <li>python</li>
</ul>

というように書くことができる。

<ol>順序ありリスト要素

1.HTML
2.CSS
3.JavaScript
のように、順序があるリストを表す要素である。
こちらも<ul>要素と同じように

<ol>
    <li>C</li>
    <li>C++</li>
    <li>python</li>
</ol>

と書くことができる。

また、これらのリスト要素はリストをさらにネスト(入れ子)することができる。

<ol>
    <li>HTML
        <ul>
            <li>CSS</li>
            <li>JavaScript</li>
        </ul>   
    </li>
</ol>

と書くことによって
1.HTML
   ・CSS
   ・JavaScript
というように表すことができる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?