0

I have written a web server that may be accessible by some users only over a local intranet that is not connected to the internet. The web page I am serving includes stylesheet 'body" information that defines a button that the client clicks to receive specific information from the server about the condition of equipment that the server is monitoring or to to tell that equipment to do something. Button examples I have seen all point to an external website that defines the button. One representative example is "link rel='stylesheet' type='text/css' href='http://randomnerdtutorials.com.com/ethernetcss.css' / that points the < href statement later in the code to the website that is reached over the internet to fetch the "body" stylesheet information. How do I store locally on my web server itself (and point to with <a ref) the information defining the button without having to use a reference to an external website which some users would never be able to reach? I assume it is in the form "link rel='stylesheet' type='text/css' href'='(I don't know what to point to here)' /. Or do I simply somehow just put all of this in the HTML code of the page I am serving to the client without having to reference something else?

Hopefully this is not too dumb a question.

kend
  • 1
  • 1
  • 2
    Use a relative path: https://stackoverflow.com/questions/17621324/relative-path-to-css-file – Kyle Mar 22 '21 at 21:37
  • Thank you for the suggestion. I should have been more clear in stating the question. My "web server" is an Arduino board, not a computer. There is no location in which to "store" the css file that can be pointed to by a link or ref in the html code. Can I define the button in the html code itself without making a reference to some other location. – kend Mar 24 '21 at 16:34
  • Yes you will want to put your CSS in tags inside of the tags in your HTML file then. EXAMPLE: https://www.w3schools.com/tags/tag_style.asp – Kyle Mar 25 '21 at 17:18

0 Answers0