HTML

HTML (Hypertext Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.


Structure Code


HTML Tags Example


Headings

There are six headings available in HTML, H1 is the largest among all, and H6 is the smallest.

 

 h1 Tag

  <h1> This is h1 Heading  </h1>

 

h2 Tag

  <h2> This is h2 Heading  </h2>

 h3 Tag

  <h3> This is h3 Heading  </h3>

h4 Tag

  <h4> This is h4 Heading  </h4>

h5 Tag

  <h5> This is h5 Heading  </h5>

h6 Tag

  <h6> This is h6 Heading  </h6>

 

                                                                                                    
Container

Container tags are the tags that contain some data such as text, image, etc. There are several container tags in HTML.

div tag

div tag or division tag is used to make blocks or divisions in the document.

  <div> This is div block </div>


span tag

span is a container for inline content 

  <span> This is span block </ span>

 

p tag

Paragraph

  <p> This is a Paragraph </p>


pre tag

pre tag represents pre-formatted text

  <pre> space  tag  </pre>

 

Text Formatting

Text formatting tags are used to format text or data of HTML documents. You can do certain things like creating italic, bold, strong text to make your document look more attractive and understandable.

 

<b> tag

  <b> bold text </b>

  

<i> tag

  <i> italic text  </i>

<U> tag

  <u> Underline text</u>

 

<em> tag

  <em> Emphasized text</em>

 

<sub> tag

  <sub> subscript  </sub>

 

<sup> tag

  <sup> suberscript  </sup>

 

Lists

Lists can be either numerical, alphabetic, bullet, or other symbols. You can specify list type and list items in HTML for the clean document.

 

<ol> tag

Ordered list starts with <ol> tag and each list item start with <li> tag

  <ol>  

         <li> list item 1  </li>

         <li> list item 2  </li>

         <li> list item 3  </li>

  </ol>

  

<ul> tag

Unordered list starts with <ul> tag and each list item start with <li> tag

    <ul>  

         <li> list item 1  </li>

         <li> list item 2  </li>

  </ul>


Links

Links are clickable text that can redirect you to some other page.

<a> tag

<a> or anchor tag defines a hyperlink. 

  <u> Underline text</u>


Media

Media is anything that is present in digital form such as image, video, audio, etc.

<audio> tag

It is used to embed sound content in the documen.

  <audio controls>

             <source  src =” audio.mp3” >

  </audio>

 

<img> tag

It is used to embed or import image in a webpage.

    <img  src =” image/mishu.jpg” alt= “text” >

<video> tag

It is used to embed video in the webpage.

  <video controls>

             <source  src =” video.mp3” >

  </video>

 

Table

A table is a collection of rows and columns. It is used to represent data in tabular form

Table Structure

        <table border="2" >

            <h1>This is table</h1>

            <caption>Demo Table</caption>

           <tr bgcolor="pink">

                <th>Name  </th> <th> Age </th><th> Roll No </th> <th>class</th>

            </tr>

            <tr>

                <td>Musharaf ali</td><td>21 </td><td>5074 </td> <td>BSSE</td>

            </tr>

            <tr>

                <td>Shayan Ashraf</td><td>21 </td><td>5044 </td> <td>BSSE</td>

            </tr>

            <tr>

                <td>Usama Raiz</td><td> 16 </td><td>5050 </td> <td>BSSE</td>

            </tr>

            <tr>

                <td>Muzzamal Razzaq</td><td>25 </td><td>5075 </td> <td>BSSE</td>

            </tr>

        </table>

 

 





_____________________________________________________


          Tags                              Define

  • <!--...-->                        Defines a comment
  • <!DOCTYPE>               Defines the document type
  • <a>                               Defines a hyperlink
  • <audio>                        Defines embedded sound content
  • <b>                               Defines bold text
  • <body>                          Defines the document's body
  • <br>                              Defines a single line break
  • <button>                       Defines a clickable button
  • <caption>                      Defines a table caption
  • <code>                         Defines a piece of computer code
  • <dialog>                        Defines a dialog box or window
  • <div>                             Defines a section in a document
  • <dl>                               Defines a description list
  • <dt>                               Defines a term/name in a description list
  • <em>                             Defines emphasized text
  • <embed>                       Defines a container for an external application
  • <fieldset>                       Groups related elements in a form
  • <figcaption>                   Defines a caption for a <figure> element
  • <figure>                         Specifies self-contained content
  • <font>                             Defines font, color, and size for text
  • <footer>                         Defines a footer for a document or section
  • <form>                            Defines an HTML form for user input
  • <frame>                          Defines a window (a frame) in a frameset
  • <frameset>                     Defines a set of frames
  • <h1> to  <h6>                 Defines HTML headings
  • <head>                          Contains metadata/information for the document
  • <header>                       Defines a header for a document or section
  • <hr>                               Defines a thematic change in the content
  • <html>                            Defines the root of an HTML document
  • <i>                                  Defines a part of text in an alternate voice or mood
  • <iframe>                         Defines an inline frame
  • <img>                              Defines an image
  • <input>                           Defines an input control
  • <label>                           Defines a label for an <input> element
  • <legend>                        Defines a caption for a <fieldset> element
  • <li>                                 Defines a list item
  • <link>                             Defines the relationship between a document and an external                                          resource (most  used to link to style sheets)
  • <main>                           Specifies the main content of a document
  • <map>                           Defines an image map
  • <mark>                          Defines marked/highlighted text
  • <meta>                          Defines metadata about an HTML document
  • <meter>                         Defines a scalar measurement within a known range (a gauge)
  • <nav>                             Defines navigation links
  • <ol>                                Defines an ordered list
  • <option>                         Defines an option in a drop-down list
  • <output>                         Defines the result of a calculation
  • <p>                                 Defines a paragraph
  • <param>                         Defines a parameter for an object
  • <picture>                         Defines a container for multiple image resources
  • <pre>                              Defines preformatted text
  • <q>                                  Defines a short quotation
  • <rp>                                 Defines what to show in browsers that do not support ruby                                               annotations
  • <rt>                                  Defines an explanation/pronunciation of characters (for East                                              Asian typography)
  • <ruby>                              Defines a ruby annotation (for East Asian typography)
  • <s>                                   Defines text that is no longer correct
  • <samp>                            Defines sample output from a computer program
  • <script>                            Defines a client-side script
  • <section>                          Defines a section in a document
  • <select>                            Defines a drop-down list
  • <small>                             Defines smaller text
  • <source>                           Defines multiple media resources for media elements                                                       (<video> and <audio>)
  • <span>                             Defines a section in a document
  • <strong>                           Defines important text



Post a Comment

1 Comments

Thanks for Supporting me

Close Menu