Web sites built by the simple way often have a main html document that the html code is written in it. If a user right clicks on the browser and select "view page source" then the name : "Example.html" will appear as page source. That file then can be found in the web site's root directory.
My question is : what about joomla? Where is that main file? What if I want to put some code in the page that I see on the front end, where do I do that?
Joomla doesn't contain any html files for displaying content, the only html files you will find are blank.
Joomla uses 2 index.php files. There is one in the template folder where all the HTML, CSS and Javascript is pushed to and the other is in the root of your Joomla site where all applications get pushed to one loaded.
When you view the page source code for a Joomla site, you are simply viewing the structure that has been pushed to the index.php file from various locations, such as from modules and components.
Update
Ok, I think this might be best done in the index.php file of your template. First, in the Joomla backend, get the ID of the menu item that link to the page that you wish to use for your code. Once done, add the following code to the index.php:
<?php
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$menu = $app->getMenu()->getActive()->id;
if ( $menu == 1) { // change 1 to the ID that you got from the Menu Manager
$doc->addStyleDeclaration('
//css goes here
');
$doc->addScriptDeclaration('
//javascript code goes here
');
?>
<p>hello world</p>
<?php
}
?>