The basic structure of a HTML document always looks the same:
<!DOCTYPE html> <html> <head> </head> <body> </body> </html>
Each tag is an instruction to your browser, telling it how to display the content between the opening and closing tags on-screen.
HTML tags are written inside angle brackets ( < > )
You have an opening and closing tag, so your browser knows when the instruction starts and stops.
You can always spot a closing tag because it contains a forward slash ( / )
If there is no content to put between two tags, you use a self-closing tag, which is an opening and closing tag rolled into one.
Tags are always written in lower-case.
You can nest HTML tags inside each other. Just don’t forget to close your tags.
When you open a new tag you should always indent your code by pressing Tab on your keyboard. This makes it easier to read your code.
Attributes go inside the opening tag. They always have a name and a value, which you set using the equals sign ( = ) and double quotes ( ” “ ).
Web pages normally have more than just words and pictures on them.
Keep reading to find out how to change the layout and design of your page. 🙂