HTML syntax is comprised of three different parts:
<p>Hello World!</p>
<p align>Hello World!</p>
<p align="right">Hello World!</p>
Feel free to try this in the HTML file you previously created.
Understand that the format of the code you are writing does not impact how it is rendered in the browser. For example, if you skip a line in your HTML code, the text rendered in the browser will not match it. You need to use the HTML element (i.e. the instruction) to skip that line. The same goes for spaces and alignment. With that said, you do want to be thoughtful with your formatting of your code. You should get in the habit of:
Many times you will not be the only person editing the file so you want to be consistent with your formatting. If you are coming on to an already-existing project, the project manager/agency will give you their style guide.
Every HTML document should start with these four basic elements:
<html>
<head>
<title>The title of my webpage</title>
</head>
<body>
Visible content in the browser
</body>
</html>
Here is a brief description of each:
To bring your HTML document up to the HTML5 standard, the W3C requires you to insert three more pieces of code:
<!doctype html>
<html lang="en">
<head>
<title>The title of my webpage</title>
<meta charset="utf-8">
</head>
<body>
Visible content in the browser
</body>
</html>
Here is a brief description of each: