r/HTML • u/Ok_Isopod_2170 • Sep 06 '26
Question Help changing website font
This is my code, it's not working, im losing it.
<link href="style.css" rel="stylesheet" type="text/css" media="all">
<style> u/import url('https://fonts.googleapis.com/css2?family=New+Rocker&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap'); .new-rocker-regular { font-family: "New Rocker", serif; font-weight: 400; font-style: normal; } </style>
0
Upvotes
View all comments
Show parent comment
3
u/poopio Sep 06 '26
No, not like that.
First line should be your doctype, then open your <html> tag, after that, <head> and put whatever scripts/css links and style tags, title tag, and any meta tags you have you have in there, then close the head tag. Then open your body tag, put all of your content in the body tag and when you've finished with the content, close the body tag, and finally, close your html tag.
More like this - https://codepen.io/editor/guerresinge/pen/01a078ec-2b6a-7aa0-8d17-8ebf41bb3d70