<!DOCTYPE html> Every single
html file must start with this
add <html> and close
it with </html>
Afterwards
use <body> and
close it with </body>
to create the main
frame of the page
If you would like to change the background of the body, add a
background-color element, like: <body style="background-color:
blue"> if you are doing this, always use the 'style' selector or use CSS if you know how.
There are some basic elements if you would like to
make a page with HTML. These include: <p> (Add
your text here) </p> Which makes a paragraph.
There are 6 main sizes for headers. h1 h2 h3 h4 h5
and h6. h1 is the biggest. To use them, do for
example, <h1> (your text here) </h1>
You can add style selectors to this as well! <h1 style="color: green"> Hello! </h1>
If you would
like to use
italics and bold
text then
instead of <p>,
use <strong>
</strong> For
bold, and
<em> </em>
For Italics
Now we need to learn how to add tables to your page. Tables are defined by
three elements. <table> which lets the computer know it is a table, <tr>
Which adds a row, <th> Which adds a heading to the table, and <td> which
adds data to the table. Here is an example. <table width="200px, height:
200px" <tr> <th> Number of pets </th> </tr> <tr> <td> Year 7 </td> <td> 25 </td> <tr> <td>
Year 8 </td> <td> 24 </td> </tr> </table>
Always use the width and height selectors for tables. If
you want two selectors, add a comma after the first
one. Always put your selectors inbetween speech
marks.
This is an amazing resource for learning HTML. https://www.w3schools.com/html/
Codecademy is also a great
resource, as it gives you a
course.
https://www.codecademy.com/
Just pick the course you want
to do.
This is how the computer
recognizes that it is a HTML file.
If you are going to code HTML,
use notepad for the code. Save
the file as index.html and then
open it with your web
browser.