Assignment - HTML

About HTML

Hypertext Markup Language (HTML) is the standard markup language used to create web pages.
It defines the content of the webpage using a series of elements, which are marked by a start and end tag with content inside. These elements tell the browser how to render the content.
An example element has this format:

   <elementname>Content goes here</elementname>


HTML Syntax and Structure

The basic structure of a HTML page is shown below. It is common practice to indent each child element in the head and body sections to make the document more readable when developing.

     1    <!DOCTYPE html>
     2    <html>
     3      <head>
     4        <title>Example</title>
     5      </head>
     6      <body>
     7        <!--Content-->
     8        <h1>Hello</h1>
     9        <p>This is some sample html</p>
    10        <a href="index.html">This is a link</a>
    11      </body>
    12    </html> 
With reference to the example above,

To organise my HTML document, I also used other tags such as div to divide up the content in the body to make it easier to understand and style with CSS later. There are many different tags that can be used in a HTML file. Some of the commonly used ones are listed below.

Head
title Represents the document's name. Is shown as the name of the tab in a browser
link Links resources from other files. Used to link CSS files to HTML
script Used to embed JavaScript into HTML documents
meta Used to represent various other types of metadata that can't be defined with other tags

Body
h1 Marks text as a heading. Displays text in a large, bold font. Has variants such as h2, h3, etc
p Marks text as a paragraph. Displays text in normal font
img Used to embed images into a web page
table Used to show information in a table, requires other tags such as <tr> and <td> to display the content correctly
ul Used to show an unordered list of items, uses <li> to mark individual list items
nav Used to mark a section for navigation to other pages
div Has no specific meaning, used to group elements that have some similarities