How to create hierarchy by using HTML
I want to know is this possible to create hierarchy in web pages b开发者_Go百科y using HTML tags? IF yes, then which HTML tag should I use?
You can use unordered lists to create a hierarchy (the <ul>
and <li>
tags). This can give you a tree structure which is semantically valid, and on top of that you can do whatever you like to express it in interesting ways, either through CSS or Javascript.
Check out Listutorial for a great series of worked examples.
It depends on context, but lists usually suffice.
Listamatic has a two level example, but you can go as deep as you like.
Without more info of exactly what you are trying to represent it is hard to answer, but I will take a stab at it and suggest you use the heading tags <h1>
through <h6>
.
精彩评论