HTML Comments , Tags, Elements, Attributes and Entities.

HTML

We started learning a programming language with “Hello World”.

Hello World is one type of symbol to show we entered into a new world of language.

That is why we use hello world to start learning a programming language.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     Hello World
  </body>
</html>

HTML Comments

HTML comments are a way to add notes and explanations to your HTML code.

It’s only visible to developers, no users can see the comment in to the web page.

They are used to provide context and documentation for the code. Documentation helps other developers while updating the web page.

You can add comments to your HTML code by enclosing them within the

<!-- and - -> tags.

<body>
<!--this is a comments-->
   <!--  Hello World --> 
  </body>

HTML Tags

In HTML, tags are used to define the structure and layout of a web page. They are the basic building blocks that are used to create elements on a page.

For Example <h1> tag is used to create a heading element.

<h1>HTML Tags </h1>

<body>
<h1>heading Element</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt, eveniet? </p>
</body>

HTML Elements

Elements are the individual component of an HTML document, such as headings, paragraphs and images. Each element is represented by a corresponding HTML tag.

For example, a paragraph element is represented by the <p> tag.

HTML Attributes

Attributes are used to provide additional information about an element.

They are added to the opening tag of an element and they always come in the form of name-value pairs.

For example, <img src=” ” alt=” ”> src attributes to specify the source of an image.

  <img src="google.jpg" alt="">

HTML Entities

Some characters are reserved in HTML.

If you use the less than < or greater than > signs in your text, the browser might mix them with tags. To display a less than sign < we must write < or <

Non-breaking Space

A commonly used entity in HTML is the non-breaking space: &nbsp:

A non-breaking space is a space that will not break into a new line.

<body>
   <!-- html entities -->
 <h1>5 > 3 </h1>
<h1> 5 &gt; 3</h1>
<h1>5 &lt; 3</h1>
<h1>5 &copy; 3</h1>
<h1>5 &reg; 3</h1>
<h1>5 &amp; 3</h1>
<!-- non breaking scape  -->
<p>Lorem  &nbsp; &nbsp;
    &nbsp; ipsum dolor sit amet consectetur adipisicing elit. Incidunt, eveniet?</p>
</body>