Websites//HTML//101

To code our website, we are going to use the langauge HTML. Also, I think I should mention that you're free to ask questions in the comments of course, and I'll answer as best as I can.

To start of, there is one big thing you need to know about HTML. It's that every opening tag (< >) needs a closing tag (</ >).

The first tag is <html> which of course declares that the webpage will be in html.

Assuming that you are using Replit and have clicked to use HTML, CSS and Javascript, this is what will come up.

As you can see, the closing tag for html ( </html> ) is nowhere to be seen. That's because it is at the bottom to declare that all of this code is coded in html.

If you run this code, you will see that all that happens is that 'hello world' appears at the top.

Now, we are going to delete everything we don't need. Make it so your code looks like this:

Alright!

See the <title> tag? That's where - you guessed it - the title of the webpage goes! The default is 'replit'. Feel free to change that to anything you like!

See that code that says <link type ="text/css" /> ? That's the code that links onto our style sheet, which uses the language CSS. Don't be intimidated if you don't understand what any of it means. It will make more sense as we progress. CSS is what we will use later to style our website and make it look nicer.

We're going to make our website about cats, because cats are great. I will now introduce you to our heading tags!

<h1>
<h2>
<h3>
<h4>
<h5>
<h6>

So, what does any of that mean?

It's simple, actually. These all make headings. The difference is, is that they're all different sizes. Now, I'm very aware that you may think that the biggest heading would be <h6> seeing as it is the biggest number, but actually, it's <h1> ! <h6> is the smallest heading.

So now it's time to make our heading to our website!

Since it's about cats, I will make it say, well, Cats. Feel free to change it to whatever you want, however!

I typed in the following:

<h1>Cats</h1>

Now run your program! See what happens! If you did it correctly, this will display:


Now, we will talk about our paragraph tag.

It's simple, really. Just <p> .

You can say whatever you like!

Now, still inside the body tag, make your <p> tag, then say whatever you want.

This is what my website now looks like:

Bạn đang đọc truyện trên: AzTruyen.Top