Sunday, April 20, 2025

HTML Internal CSS

Internal CSS means we will have CSS code in HEAD section of our web page. A lot of people use that approach while testing CSS because there is no need to switch tabs in editors, if a web page is short. 

But, when testing is done, the best way is to copy-paste that code in external CSS file.

CSS code from last tutorial just copy-paste into your already existing page, but put it into between style html tags. Don't forget that, otherwise CSS code will not be operational. Also, you can remove a link to CSS file from a previous tutorial.

Internal CSS will have priority over External CSS file, if you decide to have it.

As last time, you are strongly recommended to watch corresponding YT tutorial on Internal CSS.

<!DOCTYPE html>

<html>
<head>
	<title>Security Tutorials</title>
	
	<style>
	body {
		background-color: white;
		color: black;
	}

	h1 {
		background-color: red;
		color: white;
	}

	p {
		background-color:yellow;
		color:black;
	}

	h3 {
		background-color: lightblue;
		color:navy;
	}
	</style>
	
</head>

<body>

	<h1>External CSS</h1>
	
	<p>Generic Text...</p>
	
	<h3>This is H3 Level of Heading</h3>
	
</body>
</html>

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...