Question:

How do I make a navigation using a ul?

by  |  earlier

0 LIKES UnLike

I forgot >.< And I need it to be horizontal. Thanks!

 Tags:

   Report

3 ANSWERS


  1. &lt;ul&gt;

    &lt;li&gt; &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;

    &lt;li&gt; &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;

    &lt;li&gt; &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;

    &lt;li&gt; &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;

    &lt;li&gt; &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;

    &lt;/ul&gt;

    Add or remove more li&#039;s as neccesary.

    -----

    I just saw that you said horizontal.

    ALT + 0149 is a bullet.

    • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt; • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt; • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt; • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt; • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt; • &lt;a href=&quot;URL&quot;&gt;TEXT&lt;/a&gt;


  2. &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml1...

    &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

    &lt;head&gt;

    &lt;style type=&quot;text/css&quot;&gt;

    ul li {

    float: left;

    list-style-type: none;

    }

    &lt;/style&gt;

    &lt;/head&gt;

    &lt;body&gt;

    &lt;ul&gt;

    &lt;li&gt;first&lt;/li&gt;

    &lt;li&gt;second&lt;/li&gt;

    &lt;/body&gt;

    &lt;/html&gt;

  3. You&#039;ll need to use CSS.  

    HTML

    &lt;div id =&quot;navbar&quot;&gt;

    &lt;ul&gt;

    &lt;li&gt;&lt;a href =&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;

    &lt;li&gt;&lt;a href =&quot;#&quot;&gt;Menu&lt;/a&gt;&lt;/li&gt;

    &lt;li&gt;&lt;a href =&quot;#&quot;&gt;Wine&lt;/a&gt;&lt;/li&gt;

    &lt;li&gt;&lt;a href =&quot;#&quot;&gt;Specials&lt;/a&gt;&lt;/li&gt;

    &lt;li&gt;&lt;a href =&quot;#&quot;&gt;Map&lt;/a&gt;&lt;/li&gt;

    &lt;/ul&gt;

    &lt;/div&gt;

    CSS

    #navbar  {

    text-indent: 0px;

    display: inline;

    }

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.