Exampler.org SAS PYTHON HTML
HTML Home
HTML Table
HTML Form
HTML Button
HTML Checkbox
HTML Select
HTML Contact Form

Hyper Text Markup Language; HTML

What is it?

Syntax:

  • This is where I explain how the syntax of the example. For example
  • Blue Font is purely HTML
  • Black Font is content
  • Red font is JavaScript and JavaScript functions (WARNING JavaScript and Java are different languages)
  • Green font is for CSS

Exampler Statement:


 Layout of a Typical Example :




<HTML>
     <HEAD>
          <TITLE>
               The Title of your Website
          </TITLE>
     </HEAD>
     <BODY onload='example();'>

              This is where we will add some content for our starter website. Note the "/" on the closing HTML tags

     </BODY>
</HTML>



<SCRIPT>
     function example()
          {
          alert("
Congratulations on your first Website")
          }
</SCRIPT>





What's happening in the script above?

  • The above code is technically a complete web page. You could copy and paste that text to a text file, save it as a "myWebsite.HTML" and your browser will run it.
  • All HTML web pages have an opening <HTML> and closing </HTML> which more or less indicates the beginning and ending of the document.
  • The Head Tag is a place where you can put a few advanced things like (JavaScript, CSS, and Meta Data about your website like the Title).
  • The Title tags, are exactly what they sound like, the Title of your interent browser tab.
  • The body, is where the meat and potatoes of your document will be stored. However, if you notice, there's a little javascript program called "onLoad"
  • Which you'll find sounds very specific. On and Load. This means that when the page loads, we want a JavaScript function to run.
  • The JavaScript function that we want to run is "Example" which does one thing. Triggers a message box with the words "Congratulations on your first Website"
  • As you may have noticed this JavaScript code is written between the two <SCRIPT> </SCRIPT> tags. This is the most common location, although there are exceptinos.


Example Output:

This is the area where I'll provide demonstrations as to what the code will look like, and how you can jazz it up.

See also; HTML Tables

See also; HTML Form

See also; HTML Buttons



Connect via LinkedIn

Kevin Regan

Have an article, idea, found a typo, want to contribute? Shoot me an email Here