Website Moodle Site designed built and hosted by Enterprise Solutions

HTML and CSS playground

type what you see below into the HTML editor, then look at the preview windw:

The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the tag.
The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
exmample of Doctype:

type the code below into the HTML window

<!DOCTYPE html>

<title>Your first website</title>

<body> <div>
<h1> This is a heading </h1>

this is a p tag it stands for paragraph
<p> this is a paragraph </p>

If you type the above code into the HTML editor and look at the preview window you will see a blue box with hello world written in red.

HTML editor

Please type the code below into the CSS window

CSS is used to style elements used in HTML to make your webpage look good

You can use it to style the elements used in the above HTML code, to make them look different

body {
background-color: skyblue;
h1 {
color: orange;
text-align: center;
color: white; }
p {
font-family: "Times New Roman";
font-size: 20px;
color: red; }
background-color: blue;

CSS editor