Your Ad Here

Essential Code for a Website

Never coded a website before? No problem! I’ll take it back to the basics for you and walk you through the beginnings of coding a web page. First of all every website needs an html tag, head tag, title tag, style tag, and a body tag. A style tag is not required when you use a css link, but we’ll get into that later. To begin, your layout should look something like this:

<html>
<head>
<title> title of your website </title>
<style type=”text/css”>
Your css style code goes here
</style>
</head>
<body>
Your content will go here
</body>
</html>

Be sure to save this as an .htm or .html document. This is the basic layout of a webpage before you put any content in it. I did not add the doc types or anything because we will talk about that later. There are many tags you will use in your web pages so I will not create a list of them. Some of the basic ones you will use are headers, paragraphs, and divs. You will use divs a lot to group specific items of your website.

 

When you assign an id to a div, only the content inside the div will be altered when you add styles inside your style tags. You style id’s by typing ‘#id name’. You style a class by typing ‘.id name’. Please note that you can use the same class tag name on multiple items, but you may only use one id per item. Also, when you style a class, everything that has that class id will be affected. Do not begin id or class tags with a number and do not enter spaces in the name of your tags.

VN:F [1.6.4_902]
Rating: 0.0/5 (0 votes cast)
VN:F [1.6.4_902]
Rating: 0 (from 0 votes)




Leave a Reply