How do i create a simple nav bar without CSS?

Is it possible to make a very simple nav bar with only HTML and no CSS?
Please Reply

Hi christopherdoescodin

sorry you cant really make a simple navbar with only html.

<p><a href="#">Home</a> | <a href="#">About</a> | <a href="#">Play</a></p>
1 Like

Is there a way to change the font of the text?.

Only with deprecated attributes. Nothing we would use today in something facing the web.

Dig up the attributes in HTML 4. They may still work, for the most part, but won’t validate as HTML5.

this worked for me

<p style="font-family:Comic Sans MS" ><a href="#">Home</a> | <a href="#">About</a> | <a href="#">Play</a></p>

Home | About | Play

This is CSS. Without CSS means using the deprecated <font></font> element.

style="font-family:'Comic Sans MS'"

Font family names that contain white space need to be quoted.

It worked for me but i did not know it uses CSS

1 Like

This worked look


Dont worry i made the text green

There are four ways we can interface with the CSS API.

  1. Inline style attribute(s)
  2. Embedded style sheet(s)
  3. External style sheet(s)
  4. DOM manipluation via script

We generally do not resort to the first approach since it is difficult to override, having the highest specificity. It gets the high specificity because of where it occurs in the cascade… Dead last. It is at the bottom of the style sheet as relates to the current node. No other selector rules exist below this one that can override it.

It’s also very hard to maintain and can lead to some real hair pulling. At minimum, if you do not wish to use an external style sheet, use an embedded one. That uses the <style></style> element in the <head></head> element.

This is without CSS…

<p><font face="Comic Sans MS" color="#007700">This is some text!</font></p>

Won’t work here. Should in a browser, though.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.