I find that some lecture notes available online as well as some websites (e.g. wiki) provide important sources of information for various scientific fields (e.g. mathematics), and are sometimes better than officially published papers or books in certain senses.
My question is that if I write a paper for official publication, can I cite them in the reference of the paper? If so, what is the format to cite them? For examples, to cite an online lecture note, may I simply write as preprint, or have to add the weblink to the note? For web sources, may I add weblinks of the websites to be cited?
For example, is it valid to cite something like: "P Schlicht. Lecture Note: A Introduction to Model Theory, Online...(or Preprint...), 2018"? I think there is no need to add the actual link to it because the link can be changed later.
Edit: This question is different from the suggested question for duplicate because I ask also what is the format to cite online notes and websites.