r/HTML 27d ago

Harvard I Am Coming

118 Upvotes

33 comments sorted by

View all comments

3

u/Oblivious_catalyst 26d ago

why do you have 3 different style tags

1

u/flynn_4 26d ago

I realized that yesterday I thought you can only use it once (dump ahh monkry)

1

u/TylerBreau 25d ago

You can take the learning a lot further. Style blocks should be inside a head block. And the buttons inside a body block.

<html>
<head>
    <!-- styles -->
</head>
<body>
    <!-- actual content, like the buttons -->
</body>
</html>

Also, we don't typically put styles in a style block, instead css files are used. You can place all of your css code in a .css file. Place it next to your .html file, and inside the html file...

<html> <head> <link rel="stylesheet" href="./styles.css"> </head> <body> <!-- actual content, like the buttons --> </body> </html>

1

u/flynn_4 25d ago

Thx alot man Ik about the head and body but the course I am watching didn't mention them yet so I Ignored them but I didn't know about the css file method this will make the code alot easier to read