This is the 7th day of my participation in the August Gwen Challenge.
HTML list tag
In HTML, list tags are divided into ordered lists and unordered lists.
Unordered list tag
The
-
tag represents an unordered list of items on an HTML page, typically rendered as a bulleted list. Use the
- tag to create an unordered list.
-
tag with the
What are the attributes of the
-
tag?
Property Value Description Compact Compact HTML5 is not supported. HTML 4.01 is deprecated. Specify that lists render smaller than normal. Type Disc Square Circle HTML5 is not supported. HTML 4.01 is deprecated. Specifies the type of bullet for a list.Copy the code
Here’s a concrete example:
< ul type = "square" compact = "compact" > < li > this is the first < / li > < li > this is the second < / li > < li > this is the third < / li > < li > this is the fourth < / li > < / ul >Copy the code
Ordered list label
The < OL > tag stands for ordered lists in HTML, short for Ordered Lists. You can customize the initial sequence number of an ordered list.
Use the
Let’s look at its properties.
Property Value Description Compact Compact IS not supported in COMPACT HTML5. Replace it with a style. Specify that lists render smaller than normal. ReversedNew reversed the specified list (9,8,7...). Start number HTML5 is not supported. Replace it with a style. Specify the starting point in the list. Type 1 A A I I Specifies the type of the list. Use is not approved. Use styles instead.Copy the code
Come and use it!
< ol type = "A" start = "4" reversed = "reversed" > < li > this is the first < / li > < li > this is the second < / li > < li > this is the third < / li > < li > this is the fourth < / li > < / ol >Copy the code
Hyperlink tag
The tag defines hyperlinks that are used to link from one page to another.
The most important attribute of the element is the href attribute, which is used to create a link to another document.
In all browsers, links look like this by default:
- Unvisited links are underlined and blue
- Links that have been visited are underlined and purple
- Active links are underlined and red
So let’s just focus on its href property.
The href value can be not only the address of a web site, for example, “www.baidu.com”, but also an HTML file. For example: “demo.html”, can also be a native image address, for example: “E:/i.jpg”
Also note that content the content in the tag can be either text or images. Such as:
The < a href = "http://www.baidu.com" > baidu < / a > < a href = "http://www.baidu.com" > < img SRC = "img / 30. JPG" / > < / a >Copy the code
Write in the last
Above is HTML list tags and hyperlink tags some knowledge, welcome to continue to learn with me some knowledge of JavaWeb basics. If there are mistakes, welcome to dig friends correct.