検索

HTML 順序なしリスト

Sep 04, 2024 pm 04:43 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

Lists in HTML are a concept of gathering a number of data or elements arranged in a specific order organized for the purpose of being used in the program execution. HTML uses three types of lists, namely Ordered List, Unordered List and Definition List, where Unordered List is a type of list where the data or elements can be arranged in the list in no specific order. The syntax for the HTML Unordered List is

  • ………..
, where
    is the tag that indicates the unordered list type.

    The three types of lists we could use to bring order to the web pages. Below are the different types:

  1. Ordered List
  2. Unordered list
  3. Definition List

In this article, we shall go through the unordered list specification with an example. The unordered list is a list that doesn’t require any order of numbering in their list; instead, we use bullets for the list levels.

Syntax of HTML Unordered List

The syntax for the unordered list is similar to the ordered list we created in the previous article. Unordered list is created using an element named

    element and ends with
tag. The list item is embedded inside the
    element.

  • ………..

Example #1

This shows how this short item list is implemented in a browser.


<title> Demo on Unordered list</title><br>   

<h1 id="u-Demo-on-Unordered-list-u"><u>Demo on Unordered list</u></h1>
<h2 id="Ingredients-for-making-of-cake">Ingredients for making of cake</h2>
<h3>
<ul type="square">
<li>Baking Powder</li>
<li>Flour</li>
<li> Sugar</li>
<li>Coco poder</li>
</ul>
<h3>

</h3>
</h3>

Output:

This will give you the result like

HTML 順序なしリスト

Example #2

Unordered List with colors and for the positions.



<title>unordered list Demo2</title>


<h1 id="Unordered-Disc">Unordered Disc</h1>
  • Lion
  • Tiger
  • Giraffe
  • Camel

Top Rhymes

  • Johny Johny Yes papa
  • Wheels on the Bus
  • Baa Baa Black Sheep

Fruits Name List

  • Avacado
  • Orange
  • Pears
  • Banana

Output:

HTML 順序なしリスト

Types of Attributes for HTML Unordered List

To figure the unordered list, there are three primary types of attributes for this unordered element. The unordered list is used where it is not required to represent the lists in any specific orders. The following sections explain the related attributes and examples of them.

This attribute gives the type of bullets to be used in the list.

  • type =’disc’ – Gives default bullet structure
  • type =’square’ – Looks like solid box bullets
  • type =’circle’ – Gives Hollow box structure

1. Attribute type=’disc.’

This is the default type, and all the items are marked as bullets. Here we use type attribute, and all these attributes support in HTML 3, To define under HTML5, we are supposed to implement list-style CSS. Here is an example demo.

Example:


<title> Demo on Unordered list Types</title><br>   

<h1 id="u-Demo-on-Unordered-list-Types-u"><u>Demo on Unordered list Types</u></h1>
  • This is Program Agenda.
    • First a Welcome Note
    • Second We Start with the talks
  • Opening Speech
  • Mrs.Claria Winston from Ireland and Eyjolfur From Bank of America.
  • Tea Break
  • Last part from the topic Data Lake By Surendran Thomas.

Output:

HTML 順序なしリスト

2. Attribute type=’square.’

Here the items are marked with Square bullets.

Example:

Demonstrating the HTML code with the square bullet embedded with style color and the position.



<meta name="viewport" content="width=device-width, initial-scale=1.5">
<style>
ul {
list-style: square;
}
ul li::before {
content: "\1022";
color: pink;
font-weight: bold;
display: inline-block;
width: 0.8em;
margin-left: -1em;
}
</style>


<h2 id="List-of-top-hollywood-movies-Square">List of top hollywood movies-Square</h2>
  • World Of the wars
  • Mission Impossible
  • Independence Day special
  • Behind enemy lines

Output:

HTML 順序なしリスト

3. Attribute type=’circle.’

This attribute gives hollow bullet values. Below are the example rendering circle and square attribute together with the nested lists.

Example:


<title> EDUCBA List Example </title>
;style>
h3{
color:orange;
}
ul{
list-style: none;
}
ul li::before {
content: "\25AA";
color: brown;
display: inline-block;
width: 1em;
margin-left: -0.8em;
font-weight: bold;
font-size:1rem;
}



<h1 id="List-of-Mobiles"> List of Mobiles</h1>
  • Redmi Xiami
  • Iphone
  • Samsung
  • Nokia

Mobile Operating System Supports

  • Android
  • Windows phone
  • Samsung
  • Nokia

Output:

HTML 順序なしリスト

Replacing HTML list Items with Customizable Images

This would ultimately enhance the overall theme and makes the website visually good. The default bullets are replaced by native style or even can customizable using images with CSS help. Actually speaking, there are three styling lists to be used in HTML. Here we go with a list-style-type and list-style-image.

Using image bullet is to make the lists more unique and differentiate the information by type, Giving the presentation a look on the web page.

In the below example, the examples are demonstrated by style properties between the list elements.

Example #1 – Style properties between the list elements



<title>HTML unordered list with Styles</title>


<style>
ul li {
background: red;
}
ul.in.li {
list-style: circle inside none;
color: red;
left: -20px;
position: inside;
text-align: left;
width: 27px;
}</style>
  • Finland is a Scandinavian Country
  • Oslo is the capital city
  • Iceland is known for its beauty , hiking, fishing
  • Ranked among the chillness country in europe

Output:

This will give out the output like

HTML 順序なしリスト

Example #2 – With image style



<style>
ul {
list-style-image: url('sqpurple.gif');
}
</style>


<h2 id="The-list-style-Demo">The list-style- Demo</h2>
<p>Harry Potter Characters:</p>
  • Harry
  • Hermione
  • Ron Weasely

Output:

HTML 順序なしリスト

Kesimpulan

Sekarang kita menemui cara membina senarai tidak tersusun dalam HTML. Kami telah melihat bagaimana elemen blok tidak tersusun memainkan peranan dalam mencipta halaman web dengan contoh yang berbeza dan meneroka beberapa ciri senarai. Malah ini boleh digunakan dalam menu navigasi untuk dipaparkan secara menegak. Penciptaan senarai Tidak Tertib adalah sangat mudah; adalah penting untuk mempertimbangkan tempat untuk membetulkan pendekatan ini untuk tempat bit terbaik. Dengan kata lain, dokumen yang sempurna lebih suka menggunakan format senarai HTML.

以上がHTML 順序なしリストの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
HTMLの目的:Webブラウザがコンテンツを表示できるようにするHTMLの目的:Webブラウザがコンテンツを表示できるようにするMay 03, 2025 am 12:03 AM

HTMLの中心的な目的は、ブラウザがWebコンテンツを理解して表示できるようにすることです。 1。HTMLは、タグなどのタグを介してWebページの構造とコンテンツを定義します。 3.HTMLは、ユーザーの相互作用をサポートするフォーム要素を提供します。 4. HTMLコードの最適化は、HTTP要求の削減やHTMLの圧縮など、Webページのパフォーマンスを改善できます。

Web開発にとってHTMLタグが重要なのはなぜですか?Web開発にとってHTMLタグが重要なのはなぜですか?May 02, 2025 am 12:03 AM

htmltagsareSterenceforwebdevelovementasyStheStructureanhandhancewebpages.1)theydefineLayout、semantics、and-interactivity.2)semanticagsimprovecessibility.3)opeusofusofagscanoptimizeperformanceandensurecross-brows-compativeation。

HTMLタグと属性に一貫したコーディングスタイルを使用することの重要性を説明します。HTMLタグと属性に一貫したコーディングスタイルを使用することの重要性を説明します。May 01, 2025 am 12:01 AM

コードの読みやすさ、保守性、効率を向上させるため、一貫したHTMLエンコーディングスタイルは重要です。 1)低ケースタグと属性を使用します。2)一貫したインデントを保持し、3)シングルまたはダブルの引用符を選択して固執する、4)プロジェクトのさまざまなスタイルの混合を避け、5)きれいなスタイルやEslintなどの自動化ツールを使用して、スタイルの一貫性を確保します。

ブートストラップ4にマルチプロジェクトカルーセルを実装する方法は?ブートストラップ4にマルチプロジェクトカルーセルを実装する方法は?Apr 30, 2025 pm 03:24 PM

Bootstrap4にマルチプロジェクトカルーセルを実装するソリューションBootstrap4にマルチプロジェクトカルーセルを実装するのは簡単な作業ではありません。ブートストラップですが...

DeepSeekの公式Webサイトは、マウススクロールイベントの浸透の影響をどのように達成していますか?DeepSeekの公式Webサイトは、マウススクロールイベントの浸透の影響をどのように達成していますか?Apr 30, 2025 pm 03:21 PM

マウススクロールイベントの浸透の効果を実現する方法は? Webを閲覧すると、いくつかの特別なインタラクションデザインに遭遇することがよくあります。たとえば、DeepSeekの公式ウェブサイトでは、...

HTMLビデオの再生コントロールスタイルを変更する方法HTMLビデオの再生コントロールスタイルを変更する方法Apr 30, 2025 pm 03:18 PM

HTMLビデオのデフォルトの再生コントロールスタイルは、CSSを介して直接変更することはできません。 1. JavaScriptを使用してカスタムコントロールを作成します。 2。CSSを介してこれらのコントロールを美化します。 3. video.jsやPLYRなどのライブラリを使用すると、互換性、ユーザーエクスペリエンス、パフォーマンスを検討してください。プロセスを簡素化できます。

お使いの携帯電話でネイティブセレクトを使用することにより、どのような問題が発生しますか?お使いの携帯電話でネイティブセレクトを使用することにより、どのような問題が発生しますか?Apr 30, 2025 pm 03:15 PM

携帯電話でネイティブセレクトを使用する際の潜在的な問題は、モバイルアプリケーションを開発するときに、ボックスを選択する必要があることがよくあります。通常、開発者...

お使いの携帯電話でネイティブ選択を使用することの欠点は何ですか?お使いの携帯電話でネイティブ選択を使用することの欠点は何ですか?Apr 30, 2025 pm 03:12 PM

お使いの携帯電話でネイティブ選択を使用することの欠点は何ですか?モバイルデバイスでアプリケーションを開発する場合、適切なUIコンポーネントを選択することが非常に重要です。多くの開発者...

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 Linux 新バージョン

SublimeText3 Linux 新バージョン

SublimeText3 Linux 最新バージョン

VSCode Windows 64 ビットのダウンロード

VSCode Windows 64 ビットのダウンロード

Microsoft によって発売された無料で強力な IDE エディター

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

mPDF

mPDF

mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。