You are currently viewing The Secret of Basic HTML Codes For Websites
  • Post category:HTML

The Secret of Basic HTML Codes For Websites

Basic HTML codes for websites

Nowadays, our daily life is related to websites. for ex: if you want to eat tasty food at the home first thing we will do is search on google, so we will find several web pages and among them, we will see the procedure to do the recipe. And If you want to purchase a product, again we will go to the shopping websites. So everything is related to websites even though if you want to watch a movie, again we will use a website to book the tickets. So, to create the websites, the basic need or the requirement is HTML. This article is about how to create Basic HTML codes for websites

What is HTML?

The HTML stands for Hypertext Markup Language, so here I mentioned it has a language don’t think it is a programming language it’s a markup language. This is used to create web pages. And this is used to create user interfaces which means the look and feel of a website. You can easily create a website using HTML and CSS. If you learn HTML you can create structure in a webpage or website.

We use tags to create a layout or content in HTML. The opening tag is a keyword surrounded by angle brackets ex: <head>, <html>, <body>, etc,. The closing tag is a keyword surrounded by angle brackets with slash ex:</head>, </html>, </body> etc,.

Basic HTML codes to display hello world

Code:

<html>
<head>
<title>HTML basic</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>

Result:

 basic html codes for websites

  1. Before you can access HTML, you must first create an HTML file. To create an HTML file you need to save your filename with a “.html” extension.
  2. Then in your HTML file, you need to write the HTML general syntax as shown in the above code.
  3. In the above code, first we have created the <html> tag and within that we have created the <head> and </body> tag.
  4. Then create a <title> tag inside the <head> tag and give your webpage-this document title inside it.
  • <html> – This is the root tag of the HTML file and we have to create all the other tags inside this tag. If you add the “lang” attribute to the <html> tag and give the value “en”, the browser will understand the language of this HTML file as English. But you don’t need to provide this because by default all HTML files and language will be in English.
  • <head> – It is the head of the HTML file. Within the <head> tag the Document title of the HTML webpage can be given using the <title> tag, when linking another file we use the <link> tag, and when importing 3rd party code we use the “@import” keyword. When we link CSS or java file in HTML we can use <link> tag inside <head> tag.
  • <body> – All the code to create the structure or layout of a webpage should be placed in the <body> tag.
  • <h1>- It is used to create the title or heading of a webpage. We need to use this tag only once per webpage. You can also use h2, h3, h4, h5, and h6 tags to create headings or subheadings of a webpage. If you compare the h1 tag with the h6 tag, h6 is displayed in a smaller size than h1, because the <h1> is a heading and <h6> is the sub-heading tag.
READ ALSO  How to Use Span in HTML | Explained

Basic HTML Code to add bullet points

<html>
<head>
   <title>HTML baics</title>
</head>
<body>
  <p> Computer programming Languges:</p>
<ul>
   <li>JAVA</li>
   <li>Python</li>
   <li>C++</li>
   <li>C </li>
</ul>
</div>
</body>
</html>

Output:

basic html codes for websites

In the above code, the paragraph text is created within the <p> tag. And the bullet points are created within the Unordered list which meansĀ  <ul> tag. To create bullet points text, add <li> tag inside <ul> tag and give text inside it

  • ul – unordered list tag
  • li – list item tag

Conclusion

As such there are many tags in HTML. If you want to create an image on your webpage then use the <image> tag, if you want to create a video using the <video> tag and if you want to add a paragraph use the <p> tag. Like this, we have tags for everything we want to create

Leave a Reply