HTML & CSS Together

I. doing some follow along with coding using some youtube videos. In a few i did last week, I started with the HTML page. then, it (seemed as if) seemed as if i HAD TO create another new page to add the CSS. keep in mind, i followed along with what the youtube video was doing. i also had them saved in the same folder as:

style.html and (something.css)

Now im doing another video follow along and it SEEMS as if the guy is typing the HTML and CSS on the same page. this makes sense because i imagine when creating, itd be a pain to switch back and forth between an HTML then CSS page

so my question is, can i write HTML and CSS on the exact same page?

This is the code so far:

Drop Down"
<!-- internal styles -->
* {
	margin: 0px;
	padding: 0px;
body {
	font-family: verdana;
	background-color: #ABC;
	padding: 50px;
	h1 {
		text-align: center;
		border-bottom: 2px solid #009;
		margin-bottom: 50px;
	/* rules for navigation menu */
	/* ============================================ */

Navigation Menu

Which would mean removing the embedded style sheet in your HTML document. A CSS file contains only CSS.

html, body {
  font-size: 100%;
  color: #000;
  background: #fff;
  margin: 0;
  padding: 0;
/* and so on... */

Yeah exactly I have been doing the same thing .
We can use the style tag but tit would make the HTML sheet bigger and more confusing to improve later.

Well a last doubt I am kinda new into this front end development and I want some projects to work ON so can you please help me if there are any somewhere where I can work.
Thank you

More importantly, an external style sheet allows all the pages of a site to draw upon the same, singular resource. Periodic updates only need to be done on one file, not many (and the number of permitted HTML pages is limitless).

There is, your place. All you need is a browser and a text editor. With a single HTML page (well formed and valid) there are endless ways we can style it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.