top of page

How to use <tag>?

 

In HTML, a tag is a piece of markup language used to define and structure content within an HTML document.

Inside the html, the content will usually be separated into two sections, the head and the body.

The head tag contains information about the website. ( place  to load CSS and JavaScript file)

The body tag is the main content in the webpage

The basic tags that are commonly used in the head and body:

A. Head tag:

1. <head> Meta tag:

       <meta charset="utf-8">

Utf8 is a type of Unicode encoding used in virtually all website around the world.

(Translate the letters, numbers and symbols human languages into computer languages)

 

2. <meta name="viewport" content="width=device-width, initial-scale=1">

 

(Function to set the size of the website and display website properly on all devices, example: computers, tablets, and mobile phone)

 

Meta tag.png

3. Title tag:

<title></title>

(Set the title of each page)

Page title tag.png

B. <body>

Organize and stylize the content. (Example: Bold text, headline, lists or tables)

1. Headline/Header tags

H tag (From h1 to h6) used for the tile of the page

H1 is bigger size to h6 small size

<h1></h1> H1 usually use for the page title

 

Header tag.png

2. Add Subtitle

<h2><h2/>

Subtitle 1.png
subtitle 2.png

Remember to save the file every time you change any thing in your website and reload the browser, otherwise you cannot review what you change!!!

bottom of page