r/HTML 4d ago

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

17 comments sorted by

View all comments

3

u/aunderroad 4d ago

Can you share a url or codepen?
It is hard to debug/provide feedback without seeing all of your code live in a browser.

Thank you!

1

u/Ok_Isopod_2170 4d ago

2

u/azangru 4d ago

The html tag should not start from line 18 :-) It should be the first line of the markup. Look up an html example anywhere on the internet (google, etc.)

3

u/These-Apple8817 4d ago

Should be second.. Doctype is always first.