Hello there! This is my first tutorial, and I hope you enjoy it!
Lets start with the sections shall we?
<html> <head> </head> <body> </body> </html>
See? Looks simple right? Well it is quite simple! Allow me to explain just a moment...
The <html> tags are used at the start of the HTML page.
The <head> tags are used for non-visible code that still effects the page.
The <body> tags are used for visible content that you will see on the page.
And of course your probably wondering... What is that / for on the 2nd tag? Well a / symbol indicates that it is a closing tag, which is used for stopping the current section or tag!
<sarcasm>If you have stayed with me till here you Good job you have somewhat of an attention span!
Now lets move on to some useful tags to use on your page!
If you want to write text you have several options
such as:
//For writing paragraphs. <p> </p> //For writing small amounts of text. <text> </text> //For writing italic texts. <i> </i> //For writing bold texts. <b> </b> //For writing underlined texts. <u> </u> //For writing striked through texts. <s> </s>
I could go ON and ON and ON about different types but I think that should get you far enough for now...
Now if you want to add javascript coding you add this into your HTML coding.
<script type="text/javascript">
Now you have two options where to put it!
#1. Non-visible coding
Put it in the <head> </head> tags.
#2. Visible content
Put it in the <body> </body> tags.
Small add on to javascript(when scripting in java use "//" to make that line a comment. it does nothing visibly to the coding yet when your coding gets longer it helps mark thing to identify what the code means!)
There, Now you better understand how to add javascript to your page! AAAAAWWWWW YEEEEAAAAH!!
Well now we'll do one more thing before I leave you to mess around with your new found skills!
Let's do a simple "Hello world!" HTML page.
with java and without java versions.
Here is the coding for it in java, I will explain with comments.
<html>
<head>
</head>
<body>
<script type="text/javascript">
System.out.Print("Hello world")
</script>
</body>
</html>
Here is the coding for it without java, will explain below codes.
<html> <head> </head> <body> <text>Hello world! </text> </body> </html>
If you where paying attention earlier you should already understand this but let's recap.
Okay all we're doing in the code is in the visible content (body section) we are writing the text "Hello world!". I know I know your probably thinking "This is wa-a-a-ayyy to easy of a project! When are we going to get to the fun part?". Well With all do respect these are the basics! It gets more fun the farther you go but remember! *YOU GOTTA KNOW THE BASICS*.
Thanks for reading and have fun with coding!

New Topic/Question
This topic is locked



MultiQuote







|