Links
HTML links are defined with the <a>
tag. The link's destination is specified in the href
attribute. Attributes are used to provide additional information about HTML elements.
<h2>Links</h2>
<!-- HTML links are defined with the <a> tag -->
<!-- The link's destination is specified in the href attribute -->
<!-- Attributes are used to provide additional information about HTML elements -->
<p>This is a <a href="https://www.example.com">link to Example.com</a>.</p>
<p>This is a <a href="https://www.google.com" target="_blank">link that opens in a new tab</a>.</p>
Output:
Links
This is a link to Example.com.
This is a link that opens in a new tab.
Lists
An unordered list starts with the <ul>
tag. Each list item starts with the <li>
tag.
The list items will be marked with bullets (small black circles) by default.
The Type Attribute:
disc
(default)circle
square
<h3>Unordered Lists</h3>
<!-- An unordered list starts with the <ul> tag -->
<!-- Each list item starts with the <li> tag -->
<!-- The list items will be marked with bullets (small black circles) by default -->
<h4>Default Unordered List</h4>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<!-- The Type Attribute for Unordered Lists -->
<h4>Unordered List with Circle Bullets</h4>
<ul type="circle">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<h4>Unordered List with Square Bullets</h4>
<ul type="square">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
Output:
Unordered Lists
Default Unordered List
- Item 1
- Item 2
- Item 3
Unordered List with Circle Bullets
- Item 1
- Item 2
- Item 3
Unordered List with Square Bullets
- Item 1
- Item 2
- Item 3
Ordered List
An ordered list starts with the <ol>
tag. Each list item starts with the <li>
tag.
The list items will be marked with numbers by default.
The Type Attribute
The type
attribute of the <ol>
tag defines the type of the list item marker:
Type | Description |
---|---|
type="1" | The list items will be numbered with numbers (default) |
type="A" | The list items will be numbered with uppercase letters |
type="a" | The list items will be numbered with lowercase letters |
type="I" | The list items will be numbered with uppercase Roman numbers |
type="i" | The list items will be numbered with lowercase Roman numbers |
<h3>Ordered Lists</h3>
<!-- An ordered list starts with the <ol> tag -->
<!-- Each list item starts with the <li> tag -->
<!-- The list items will be marked with numbers by default -->
<h4>Default Ordered List</h4>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<!-- The Type Attribute for Ordered Lists -->
<h4>Ordered List with Uppercase Letters</h4>
<ol type="A">
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ol>
<h4>Ordered List with Lowercase Letters</h4>
<ol type="a">
<li>Item a</li>
<li>Item b</li>
<li>Item c</li>
</ol>
<h4>Ordered List with Uppercase Roman Numerals</h4>
<ol type="I">
<li>Item I</li>
<li>Item II</li>
<li>Item III</li>
</ol>
<h4>Ordered List with Lowercase Roman Numerals</h4>
<ol type="i">
<li>Item i</li>
<li>Item ii</li>
<li>Item iii</li>
</ol>
Output:
Ordered Lists
Default Ordered List
- First item
- Second item
- Third item
Ordered List with Uppercase Letters
- Item A
- Item B
- Item C
Ordered List with Lowercase Letters
- Item a
- Item b
- Item c
Ordered List with Uppercase Roman Numerals
- Item I
- Item II
- Item III
Ordered List with Lowercase Roman Numerals
- Item i
- Item ii
- Item iii