Coding: HTML & CSS
HTML
HTML (Hyper Text Markup Language) is the standard markup language for creating a website. HTML is written in the form of elements comprised of tags enclosed in brackets <for example>. To close each tag, put a slash (/) after the first bracket and before the tag. It would look like this </for example>. Each tag comes with their own attributes. The most important thing to remember is that everything is written in lowercase letters.
Most commonly used HTML tags for this class:
<head><body>
<p>
<h1-h6>
<a>
<div>
CSS
CSS (Cascading Style Sheet) is what makes the website look how it looks. CSS is written with curly brackets after the tags. It would look like this h1{}. After the each attribute make sure to put a semicolon after it. Inside the bracket is where you define the color of the background and text, as well as the font style, font size, and the font weight. You can also define how much spacing you want in between the paragraphs. Also, you can specify attributes for individual tags.
Most commonly used CSS tags for this class:
colorbackground-color
font-family
font-size
padding
margin
text-align
height
width
Examples:
h1{ color: blue } |
This sets the color of the heading #1 (the most important heading and therefore the biggest to blue. |
body{ background-color: #f44506 } |
This sets the background color of the whole website to orange (the color orange in the fireball of the Firefox logo. The color is written in hex form). |