What does HTML look like?
When you make a new file in Neocities, it will look like this:
<!DOCTYPE html>
<html>
<head>
<meta-charset="UTF-8">
<meta-name="viewport" content="width-device-width, initial-scale=1.0">
<title>My Page</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
</body>
</html>
It may look intimidating, but here's a breakdown of all the parts:
- DOCTYPE html = Tells the browser what type of document it's looking at (html)
- html = Starts the part you can put stuff inside of. Nothing can go outside of "html" or it won't work.
- head = starts the head part of your code. the head section will effect your code, but nothing in there will show up on the page.
- meta charset = helps properly display text.
- meta name viewport = makes your website fit different screen sizes.
- title = the name of your page that shows up in browser (different from the file name.) You can change this to whatever you want.
- link href = you can style your pages in the css file in neocities, but I personally prefer to do it right in the current file so it is easier to change it for each individual page.
- /head = the end of the head area.
- body = the start of the main area. you can put your text, images, divs, style, etc in this part.
- /body = end of body area.
- /html = the end of your document.
You will do most of your coding in the body area.
The Less Than and Greater Than symbols are your tags. They say what type of element the code is. Most elements have an Opening Tag (<x>) and a Closing Tag (</x>)
In all the tutorials, everything will have both an Opening Tag and a Closing Tag unless specified otherwise.