# HTML(Hypertext Markup Language)

# **HTML** 

Hyper text markup Language 

HTML is the code that is used to structure a web page and its Content 

The Component used to design the structure of websites are called **HTML TAG**  

# HTML Boilerplate

       &lt;!DOCTYPE html&gt;

&lt;html lang="en"&gt;

  &lt;head&gt;

    &lt;meta charset="UTF-8"&gt;

    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;

    &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;

    &lt;title&gt;HTML 5 Boilerplate&lt;/title&gt;

    &lt;link rel="stylesheet" href="style.css"&gt;

  &lt;/head&gt;

  &lt;body&gt;

         &lt;script src="index.js"&gt;&lt;/script&gt;

  &lt;/body&gt;

# Quick Point

HTML tag is parent of head and body tag

Most of html element have opening and closing tags with content in between 

Some tags have no content in between, eg -&lt;br&gt;

We can use inspect element/view page source to edit html 

# Comment in HTML

• This is part of code that should not be parsed 

&lt;!- -This is an HTML Comment- -&gt;

      &lt;!--function displayMsg()alert("Hello World!")}//--&gt;

# Heading Tag

Users often skim a page by its headings. It is important to use headings to show the document structure. &lt;h1&gt; headings should be used for main headings, followed by &lt;h2&gt; headings, then the less important &lt;h3&gt; , and so on.  

 Heading 1       

Heading 2

Heading 3

Heading 4

Heading 5

Heading 6

## Anchor Tag

     Used to add link to your page 

&lt;a href="[https://www.growwwithcode.com"&gt;Visit](https://www.growwwithcode.com">Visit) [Growwwithcode.com](http://Growwwithcode.com)!&lt;/a&gt;

## Image Tag

    Used to add images to your page

&lt;img src="img\_girl.jpg" alt="Girl in ajacket" width="500" height="600"&gt;

## Br Tag

  Used to add next line (line breaks) to your page 

  &lt;p&gt;To force&lt;br&gt; line breaks&lt;br&gt; in a text,&lt;br&gt; use the br&lt;br&gt; element.&lt;/p&gt;

## Bold, Italic and Underline Tag

      Used to highlight text in your page

## Hr Tag

  &lt;h1&gt;The Main Languages of the Web&lt;/h1&gt;

&lt;p&gt;HTML is the how to display the content.&lt;/p&gt;

&lt;/hr&gt;

&lt;p&gt;CSS is a language that all at once.&lt;/p&gt;

## Subscript and Superscript tag

here are times when we would like to use characters that are a half a character below or above the set text. Subscripts are characters that are set half a character below the text. Superscripts are characters that are set half a character above the [text.In](http://text.In) a real-world setting, we use these characters when we’re using math equations, chemical equations, citations or footnotes, for example.

&lt;p&gt;This text contains &lt;sub&gt;subscript&lt;/sub&gt; text.&lt;/p&gt;

&lt;p&gt;This text contains &lt;sup&gt;superscript&lt;/sup&gt; text.&lt;/p&gt;

## Span Tag

          Span is also a container used for other HTML element Inline Element 

          (takes width as per size)                               

## LIST In HTML

               Lists are used to represent real life list data.

               Unordered                                  ordered

         &lt;ul&gt;                                                  &lt;ol&gt;

               &lt;li&gt;Apple&lt;/li&gt;                                  &lt;li&gt;Apple&lt;/li&gt;

        &lt;/ul&gt;                                                 &lt;/ol&gt;

## Table In HTML

              Tables are used to represent real life table data 

                 &lt;tr&gt;  Used to display table row

                 &lt;td&gt; used to display table data

                 &lt;th&gt; used to display table header 

## Form in HTML

           Forms are used to collect data from the user

             Eg- sign up/login/help requests/contact me

         &lt;form&gt;

                Form content

       &lt;/form&gt;

## Action in form  

Action attribute is used to define what action need to be performed when a form is                submitted    

                   &lt;form action=”/action.PHP”&gt;

**From Element : Input**                    

                &lt;input type=”text ”Placeholder=”Enter Name”&gt;

## Class and ID

        &lt;div id =”id1”class=”group1”&gt; &lt;/div&gt;

        &lt;div id = “id2” class= “group2”&gt; &lt;/div&gt;

## Checkbox

     &lt;lable for=”id1”&gt;

               &lt;input type =”checkbox”value+”classX”name=”class” id=”id1”&gt;     &lt;/lable&gt;

## Video tag

        &lt;video src=”myvid.mp4”&gt;my video&lt;/video&gt;

          Attribut

controls

height

width

autoplay
