How To Write Your First HTML Code with a bit of CSS using the <style> tag.

Now, guys, this is a disclaimer and it is that I am a beginner at code and just started learning HTML and CSS recently so please any professionals help me improve in the comments.

Now We Are Going To Get started immediately

Please make sure you read the notes at the bottom.

First of all go to your code editor I recommend visual studio code, notepad, or atom.

You can copy and paste or type it you self, but make sure you master all the elements.



<title> anything you want</title>

<style type= “text/css”>

body {

background-color: #42FF33;

margin-left: 20%;


border: 1px dotted gray;

padding: 15px 15px 15px 15px;

font-family: cursive;





<h1> anything you want</h1>

<h2> anything you want</h2>

<p>anything you want</p>



. This is our basic HTML and Css, copy it and edit anything you want to change.


. <h1> is your header

.<h2> is your subheader

. <p> is your paragraph

.The title, background-color, margin-left, margin-right, border, padding, font-family can be edited or changed. So if you don’t like the margin at 20% you can absolutely change it t 10% or 30%. The text inside<h1> and </h1>, <h2> and </h2>, <p> and </p>can all be edited, but the tags itself cannot. So if you put <h3> instead of <h1> do not expect to see a header.

.Anything inside <> cannot be edited, but again the text in between <> and </> can be edited.

. To end an element you must use “/” in front of the tag.

. You must use body { and } when using the style element.

.If you don't know the color codes for your background, go to “” and select the color you prefer and it will automatically give you the code.

. If you don’t know the font-family to use go to “”.

. After you are done typing and editing your code go to files, and click save as.

Then you files explorer will pop up, save it as idex.html, whatever.html, or Jack.html, it does not matter all is that you need “.html”

After that look down at the bottom of your whatever.html and you will see HTML, change that to All Files.

After saving, go to your files explorer and you should see

Click on it and this should pop up.

. Coding can be very tuff and difficult.

. Use tutorials to help you with your coding journey.

Have a good day


Hi I am 13 and love writing. Make sure you have a great day