<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bhabani Sankar</title>
    <description>The latest articles on DEV Community by Bhabani Sankar (@bhabani_sankar).</description>
    <link>https://dev.to/bhabani_sankar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2587242%2F6f454677-8f4e-4bec-bad3-c373c0d1de53.jpg</url>
      <title>DEV Community: Bhabani Sankar</title>
      <link>https://dev.to/bhabani_sankar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhabani_sankar"/>
    <language>en</language>
    <item>
      <title>Bootstrap: A Complete Guide</title>
      <dc:creator>Bhabani Sankar</dc:creator>
      <pubDate>Mon, 24 Mar 2025 20:41:49 +0000</pubDate>
      <link>https://dev.to/bhabani_sankar/bootstrap-a-complete-guide-3oll</link>
      <guid>https://dev.to/bhabani_sankar/bootstrap-a-complete-guide-3oll</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Bootstrap?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap is a toolkit that allows developers to build responsive websites faster.&lt;/li&gt;
&lt;li&gt;It provides components &amp;amp; plugins for easy design, extend, debug, test and deploy.&lt;/li&gt;
&lt;li&gt;It provides tools required form building interactive UI from web and native apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to Use Bootstrap?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding Bootstrap to Your Project&lt;/strong&gt;&lt;br&gt;
There are two main ways to add Bootstrap to your project:&lt;br&gt;
A.  &lt;strong&gt;Using CDN (Quickest Method)&lt;/strong&gt;&lt;br&gt;
Add the following lines inside your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- Bootstrap CSS --&amp;gt;
&amp;lt;link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"&amp;gt;

&amp;lt;!-- Bootstrap JS (Optional, for interactive components) --&amp;gt;
&amp;lt;script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"&amp;gt;&amp;lt;/script&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;B.  &lt;strong&gt;Installing via NPM&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install bootstrap

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, import Bootstrap in your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.bundle.min.js';

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Architecture of Bootstrap&lt;/strong&gt;&lt;br&gt;
Bootstrap is built using the following technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5&lt;/strong&gt; – Defines the structure of the webpage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS3&lt;/strong&gt; – Provides styles and responsive layout mechanisms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript (Vanilla JS in Bootstrap 5)&lt;/strong&gt; – Used for interactive components like modals, tooltips, and carousels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sass (SCSS)&lt;/strong&gt; – A CSS preprocessor used for customization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Bootstrap Classes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap provides a set of pre-defined classes that allow to configure various styles for elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Container Classes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;These classes are configured with pre-defined media queries.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can use for various devices.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.container&lt;/code&gt;           small devices [mobile]&lt;br&gt;
    &lt;code&gt;.container-sm&lt;/code&gt;        tab&lt;br&gt;
    &lt;code&gt;.container-md&lt;/code&gt;         PC&lt;br&gt;
    &lt;code&gt;.container-lg&lt;/code&gt;        Laptop&lt;br&gt;
   &lt;code&gt;.container-xl&lt;/code&gt;        Laptop Large Screen&lt;br&gt;
    &lt;code&gt;.container-xxl&lt;/code&gt;        Wide screen devices&lt;br&gt;
    &lt;code&gt;.container-fluid&lt;/code&gt;      It can adjust according to device.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Box Model Classes&lt;/strong&gt;&lt;br&gt;
a) Margins&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.margin-{break-point}&lt;/code&gt;     all directions, break-point can be 1 to 4&lt;br&gt;
           &lt;code&gt;.me-{ }&lt;/code&gt;                 end [right]&lt;br&gt;
           &lt;code&gt;.ms-{ }&lt;/code&gt;                 start [left]&lt;br&gt;
           &lt;code&gt;.mx-{ }&lt;/code&gt;              left &amp;amp; right&lt;br&gt;
            &lt;code&gt;.mt-{ }&lt;/code&gt;                 top&lt;br&gt;
            &lt;code&gt;.mb-{ }&lt;/code&gt;               bottom&lt;br&gt;
           &lt;code&gt;.my-{ }&lt;/code&gt;                top &amp;amp; bottom&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
              &amp;lt;div  class="ms-4"&amp;gt;
                &amp;lt;span class="mx-3"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;b) Padding&lt;br&gt;
            &lt;code&gt;.p-{ }&lt;/code&gt;                    all directions 1 to 4&lt;br&gt;
            &lt;code&gt;.pe-{ }&lt;/code&gt;&lt;br&gt;
            &lt;code&gt;.ps-{ }&lt;/code&gt;&lt;br&gt;
            &lt;code&gt;.px-{ }&lt;/code&gt;&lt;br&gt;
            &lt;code&gt;.pb-{ }&lt;/code&gt;&lt;br&gt;
            &lt;code&gt;.pt-{ }&lt;/code&gt;&lt;br&gt;
            &lt;code&gt;.py-{ }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;c) Border&lt;br&gt;
    &lt;code&gt;.border&lt;/code&gt;               base class&lt;br&gt;
  &lt;code&gt;.border-{contextual}&lt;/code&gt;    primary, secondary, danger, warning, success&lt;br&gt;
                                info, dark, light etc.&lt;br&gt;
 &lt;code&gt;.border-{size}&lt;/code&gt;            1 to 4&lt;/p&gt;

&lt;p&gt;d) width&lt;br&gt;
          &lt;code&gt;.w-{ }&lt;/code&gt;             25, 50, 100&lt;/p&gt;

&lt;p&gt;e) height&lt;br&gt;&lt;br&gt;
            &lt;code&gt;.h-{ }&lt;/code&gt;                  50, 100&lt;/p&gt;

&lt;p&gt;f)  border radius&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.rounded&lt;/code&gt;             base class&lt;br&gt;
   &lt;code&gt;.rounded-{ }&lt;/code&gt;&lt;br&gt;
   &lt;code&gt;.rounded-circle&lt;/code&gt;&lt;br&gt;
      &lt;code&gt;.rounded-pill&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Position Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.position-static&lt;/code&gt;&lt;br&gt;
       &lt;code&gt;.position-relative&lt;/code&gt;&lt;br&gt;
       &lt;code&gt;.position-absolute&lt;/code&gt;&lt;br&gt;
       &lt;code&gt;.position-fixed&lt;/code&gt;&lt;br&gt;
       &lt;code&gt;.position-sticky&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.top-{ }&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.start-{ }&lt;/code&gt;           =&amp;gt; 0, 50, 100&lt;br&gt;
        &lt;code&gt;.end-{ }&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.bottom-{ }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background &amp;amp; Text Color&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.bg-{contextual}&lt;br&gt;
     .text-{contextual}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="bg-danger text-light"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Display Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.d-none&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.d-block&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.d-inline&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.d-inline-block&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.d-flex&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.flex-wrap&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.flex-row&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.flex-column&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.justify-content-between&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.justify-content-evenly&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.justify-content-center&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.align-items-center&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.align-items-baseline&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;.align-items-end&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grid System&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.row&lt;/code&gt;   row&lt;br&gt;
&lt;code&gt;.col&lt;/code&gt;   responsive column&lt;br&gt;
&lt;code&gt;.col-{ }&lt;/code&gt;    column with 12 break points&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
        &amp;lt;div class="row"&amp;gt;
            &amp;lt;div class="col-2"&amp;gt; &amp;lt;/div&amp;gt;
            &amp;lt;div class="col-10"&amp;gt; &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Text &amp;amp; Font Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fs-{ }&lt;/code&gt;            font size 1 to 7&lt;br&gt;
    &lt;code&gt;h{ }&lt;/code&gt;            heading size 1 to 6&lt;br&gt;
        &lt;code&gt;fw-bold&lt;/code&gt;        font weight&lt;br&gt;
        &lt;code&gt;fs-italic&lt;/code&gt;        font style&lt;br&gt;
        &lt;code&gt;text-start&lt;/code&gt;        left align&lt;br&gt;
        &lt;code&gt;text-center&lt;/code&gt;    center align&lt;br&gt;
        &lt;code&gt;text-end&lt;/code&gt;        right&lt;br&gt;
        &lt;code&gt;text-justify&lt;/code&gt;    justified&lt;br&gt;
        &lt;code&gt;text-decoration-underline&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;text-decoration-overline&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;text-decoration-linethrough&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Ex-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body class="container-fluid"&amp;gt;
     &amp;lt;div class="fs-1 fw-bold text-decoration-underline text-center"&amp;gt;Bootstrap&amp;lt;/div&amp;gt;
     &amp;lt;span class="h1"&amp;gt;Welcome&amp;lt;/span&amp;gt; to Bootstrap
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Button Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.btn      &lt;br&gt;
        .btn-{contextual}    &lt;br&gt;
        .btn-outline-{contextual}&lt;br&gt;
        .btn-group&lt;br&gt;
        .btn-toolbar&lt;br&gt;
        .btn-close&lt;br&gt;
        .btn-link&lt;br&gt;
        .btn-group-vertical&lt;br&gt;
        .btn-sm&lt;br&gt;
        .btn-lg&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
        &amp;lt;button  class="btn btn-primary btn-lg"&amp;gt; Text  &amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Form Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.form-control&lt;/code&gt;        text, email, url, password, textarea, date &amp;amp; time, number&lt;br&gt;
    &lt;code&gt;.form-range&lt;/code&gt;        range&lt;br&gt;
    &lt;code&gt;.form-select&lt;/code&gt;        dropdown, listbox&lt;br&gt;
    &lt;code&gt;.form-check-input&lt;/code&gt;    radio, checkbox&lt;br&gt;
    &lt;code&gt;.form-check-label&lt;/code&gt;   labels for radio &amp;amp; checkbox&lt;br&gt;
    &lt;code&gt;.form-label&lt;/code&gt;       labels&lt;br&gt;
    &lt;code&gt;.form-control-color&lt;/code&gt;    color&lt;br&gt;
    &lt;code&gt;.form-control-file&lt;/code&gt;    file&lt;br&gt;
    &lt;code&gt;.form-switch&lt;/code&gt;        radio &amp;amp; checkbox container&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Group Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.input-group&lt;br&gt;
        .input-group-text&lt;br&gt;
        .input-group-sm | lg&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.table&lt;br&gt;
        .table-hover&lt;br&gt;
        .table-bordered&lt;br&gt;
        .table-striped&lt;br&gt;
        .table-{contextual}&lt;br&gt;
        .table-responsive&lt;br&gt;
        .caption-top&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;table  class="table table-hover table-bordered table-dark"&amp;gt;

    &amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: Bootstrap 5 requires a container to keep responsive table.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="table-responsive"&amp;gt;

        &amp;lt;table&amp;gt;

        &amp;lt;/table&amp;gt;

    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List Style &amp;amp; List Group Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.list-unstyled&lt;/code&gt;                  removes numbering or bullets&lt;br&gt;
        &lt;code&gt;.list-group&lt;/code&gt;                It removes list style and groups items.&lt;br&gt;
        &lt;code&gt;.list-group-item&lt;/code&gt;            Individual list item&lt;br&gt;
        &lt;code&gt;.list-group-item-{contextual}&lt;/code&gt;    colors&lt;br&gt;
        &lt;code&gt;.list-group-horizontal&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
        &amp;lt;ol class="list-unstyled"&amp;gt;
        &amp;lt;ul class="list-group"&amp;gt;
          &amp;lt;li class="list-group-item list-group-item-danger"&amp;gt;  &amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Bootstrap Components
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A component comprises of 3 basic elements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;a) Design&lt;br&gt;
b) Styles&lt;br&gt;
c) Functionality&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design is created with HTML.&lt;/li&gt;
&lt;li&gt;Styles are defined with CSS.&lt;/li&gt;
&lt;li&gt;Functionality is configured using JavaScript/jQuery.&lt;/li&gt;
&lt;li&gt;Bootstrap provides several free components like&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;alerts&lt;br&gt;
 carousel&lt;br&gt;
 navbar&lt;br&gt;
 progress&lt;br&gt;
 spinners&lt;br&gt;
 nav tabs  etc..&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;alert&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is a message box embedded into page.&lt;/li&gt;
&lt;li&gt;It is used for displaying messages dynamically.&lt;/li&gt;
&lt;li&gt;It allows to open or close message dynamically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.alert&lt;br&gt;
    .alert-{contextual}    &lt;br&gt;
    .alert-dismissible&lt;br&gt;
    .alert-title&lt;br&gt;
    .alert-link&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data-bs-toggle&lt;/code&gt;           It refers to component name to use when button clicked.&lt;br&gt;
&lt;code&gt;data-bs-dismiss&lt;/code&gt;       It attaches close functionality for component.&lt;br&gt;&lt;br&gt;
&lt;code&gt;data-bs-target&lt;/code&gt;           It refers to the ID of component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="alert alert-dismissible"&amp;gt;
        &amp;lt;button  data-bs-dismiss="alert"&amp;gt; &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Modal&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines a popup dialog box.&lt;/li&gt;
&lt;li&gt;Dialog opens with content in backdrop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.modal&lt;br&gt;
     .modal-dialog&lt;br&gt;
     .modal-content&lt;br&gt;
     .modal-header&lt;br&gt;
     .modal-body&lt;br&gt;
     .modal-footer&lt;br&gt;
     .modal-dialog-centered&lt;br&gt;
     .modal-dialog-scrollable&lt;br&gt;
     .modal-fullscreen&lt;br&gt;
     .fade [animation]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="modal"&amp;gt;
       &amp;lt;div class="modal-dialog"&amp;gt;
        &amp;lt;div class="modal-content"&amp;gt;
             // header
            // body
            // footer
        &amp;lt;/div&amp;gt;
       &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attributes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data-bs-toggle&lt;br&gt;
    data-bs-target&lt;br&gt;
    data-bs-dismiss&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: A page may contain several modals, hence every modal must have a reference ID. [Identification]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Offcanvas&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is similar to a modal but have various directions.&lt;/li&gt;
&lt;li&gt;You can popup with content in backdrop but the direction can be left, right, top or bottom. [start=left, end=right]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.offcanvas&lt;br&gt;
    .offcanvas-start | end | top | bottom&lt;br&gt;
    .offcanvas-title&lt;br&gt;
    .offcanvas-header&lt;br&gt;
    .offcanvas-body&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="offcanvas offcanvas-start"&amp;gt;
        &amp;lt;div class="offcanvas-header"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="offcanvas-body"&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Carousel&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It allows to create sliding and fading content in page.&lt;/li&gt;
&lt;li&gt;You can control manually and auto.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basic Carousel Classes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.carousel&lt;br&gt;
    .carousel-inner&lt;br&gt;
    .carousel-item&lt;br&gt;
    .active&lt;br&gt;
    .carousel-fade&lt;br&gt;
    .slide&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="carousel"&amp;gt;
        &amp;lt;div class="carousel-inner"&amp;gt;
            &amp;lt;div class="carousel-item"&amp;gt; &amp;lt;/div&amp;gt;
            ... several items ...
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-- Make sure that any one carousel-item is active.&lt;br&gt;
&lt;code&gt;&amp;lt;div class="carousel-item active"&amp;gt; &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;--Carousel need to start explicitly by using the attribute "data-bs-ride".&lt;br&gt;
&lt;code&gt;&amp;lt;div class="carousel"  data-bs-ride="carousel"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;--Carousel requires "slide" class to configure slide animation.&lt;br&gt;
&lt;code&gt;&amp;lt;div class="carousel slide"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;--You can also define fade animation using "carousel-fade" class.&lt;br&gt;
&lt;code&gt;&amp;lt;div class="carousel carousel-fade"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Carousel Controls&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Controls allow to navigate between items.&lt;/li&gt;
&lt;li&gt;You can move to next or previous item.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes :-&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.carousel-control-prev&lt;br&gt;
        .carousel-control-prev-icon&lt;br&gt;
        .carousel-control-next&lt;br&gt;
        .carousel-control-next-icon&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes :-&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data-bs-slide="prev"&lt;br&gt;
        data-bs-slide="next"&lt;br&gt;
        data-bs-target="#carousel_id"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;--Carousel controls can be light or dark, to apply dark style&lt;br&gt;
&lt;code&gt;data-bs-theme="dark"&lt;/code&gt;         latest version&lt;br&gt;
        &lt;code&gt;carousel-dark&lt;/code&gt;                pervious version [deprecated]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
        &amp;lt;div class="carousel" data-bs-theme="dark"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Carousel Indicators&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Indicators allow random navigation.&lt;/li&gt;
&lt;li&gt;You can navigate to any specific item directly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Class:&lt;br&gt;
&lt;code&gt;.carousel-indicators&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes:&lt;br&gt;
&lt;code&gt;data-bs-slide-to-{ }&lt;/code&gt;        index number starts with 0 = first item.&lt;br&gt;
    &lt;code&gt;data-bs-target&lt;/code&gt;            it refers to carouse id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="carousel-indicators"&amp;gt;
        &amp;lt;button&amp;gt;&amp;lt;/button&amp;gt;            // every button refers to a carousel item
        &amp;lt;button&amp;gt;&amp;lt;/button&amp;gt;    
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-- Make sure that any one button is active.&lt;br&gt;
&lt;em&gt;Note: The active must match with the carousel-item that is active.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Carousel Timing&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can control the timing for items.&lt;/li&gt;
&lt;li&gt;Timing refers to interval between items.&lt;/li&gt;
&lt;li&gt;You can use the attribute  "data-bs-interval".
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="carousel-item" data-bs-interval="3000"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;1000 = 1second&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collapse&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to show or hide any content dynamically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.collapse&lt;br&gt;
    .show&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes:&lt;br&gt;
&lt;code&gt;data-bs-target&lt;br&gt;
    data-bs-toggle&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="collapse show"  id="p1"&amp;gt;  &amp;lt;/div&amp;gt;

    &amp;lt;button data-bs-toggle="collapse" data-bs-target="#p1"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Accordion&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is a set of items with show &amp;amp; hide functionality.&lt;/li&gt;
&lt;li&gt;Accordion can show or hide using "Mutex" [Mutual Exclusion].&lt;/li&gt;
&lt;li&gt;If any one item is open then others are hidden.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.accordion&lt;br&gt;
    .accordion-item&lt;br&gt;
    .accordion-header&lt;br&gt;
    .accordion-body&lt;br&gt;
    .accordion-button&lt;br&gt;
    .accordion-collapse&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes&lt;br&gt;
&lt;code&gt;data-bs-target&lt;br&gt;
    data-bs-toggle&lt;br&gt;
    data-bs-parent&lt;/code&gt;   It is defined for collapse in accordion, it refers to parent ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="accordion-collapse collapse"  data-bs-parent="#accordion_id"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Nav with tabs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used for creating tab based navigation.&lt;/li&gt;
&lt;li&gt;In one page you can display multiple categories using tabs.
&lt;/li&gt;
&lt;li&gt;User can switch between tabs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.nav-tabs&lt;br&gt;
    .nav-pill&lt;br&gt;
    .nav-item&lt;br&gt;
    .nav-link&lt;br&gt;
    .nav-text [obsolete] .nav-item-text&lt;br&gt;
    .tab-content&lt;br&gt;
    .tab-pane&lt;br&gt;
    .nav     [base class]&lt;br&gt;
    .active&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;ul class="nav nav-tabs"&amp;gt;
        &amp;lt;li  class="nav-item"&amp;gt;
        &amp;lt;a class="nav-link"&amp;gt;
            &amp;lt;span class="nav-item-text"&amp;gt; &amp;lt;/span&amp;gt;
        &amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
    &amp;lt;div class="tab-content"&amp;gt;
        &amp;lt;div class="tab-pane"&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Navbar&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to design responsive navigation bar.&lt;/li&gt;
&lt;li&gt;It uses media query and changes according device width.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.navbar&lt;br&gt;
    .navbar-expand-{lg | sm}&lt;br&gt;
    .navbar-nav&lt;br&gt;
    .navbar-collapse&lt;br&gt;
    .navbar-dark | light&lt;br&gt;
    .nav-menu&lt;br&gt;
    .nav-item&lt;br&gt;
    .nav-link&lt;br&gt;
    .nav-item-text&lt;br&gt;
    .navbar-brand&lt;br&gt;
    .navbar-toggler&lt;br&gt;
    .navbar-toggler-icon&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Progress Bar&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to show status of any task performed in page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.progress&lt;br&gt;
    .progress-bar&lt;br&gt;
    .progress-bar-striped&lt;br&gt;
    .progress-bar-animated&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="progress"&amp;gt;
        &amp;lt;div class="progress-bar"&amp;gt; &amp;lt;/div&amp;gt;
        ..... multiple progress bars ...
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The size of progress is defined by using "width".&lt;/li&gt;
&lt;li&gt;Width is configured with style attribute and it is defined in "%".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Spinners&lt;/strong&gt;&lt;br&gt;
classes:&lt;br&gt;
&lt;code&gt;.spinner-grow&lt;br&gt;
    .spinner-grow-sm|lg&lt;br&gt;
    .spinner-border&lt;br&gt;
    .spinner-border-sm | lg&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;span class="spinner-border text-danger"&amp;gt; &amp;lt;/span&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pagination&lt;/strong&gt;&lt;br&gt;
classes:&lt;br&gt;
&lt;code&gt;.pagination&lt;br&gt;
    .page-item&lt;br&gt;
    .page-link&lt;br&gt;
    .page-item-text&lt;br&gt;
    .active&lt;br&gt;
    .disabled&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dropdown&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It allows to configure a list that can open in various directions.&lt;/li&gt;
&lt;li&gt;List allows complex format of content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.dropdown&lt;br&gt;
        .dropup&lt;br&gt;
        .dropend&lt;br&gt;
        .dropstart&lt;br&gt;
        .dropdown-toggler&lt;br&gt;
        .dropdown-menu&lt;br&gt;
        .dropdown-item&lt;br&gt;
        .dropdown-item-text&lt;br&gt;
        .dropdown-divider&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Attributes:&lt;br&gt;
&lt;code&gt;data-bs-toggle&lt;br&gt;
data-bs-theme="dark"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;div class="dropdown"&amp;gt;
        &amp;lt;button class="dropdown-toggler"&amp;gt; Text &amp;lt;/button&amp;gt;
        &amp;lt;ul class="dropdown-menu"&amp;gt;
        &amp;lt;li class="dropdown-item"&amp;gt; &amp;lt;span class="dropdown-item-text"&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Scroll Spy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used for intra document navigation.&lt;/li&gt;
&lt;li&gt;It can identify the scrolling content and highlight relative titles or menu items.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Attributes:&lt;br&gt;
&lt;code&gt;data-bs-spy="scroll"&lt;br&gt;
    data-bs-target&lt;br&gt;
    data-bs-smooth-scroll="true"&lt;br&gt;
    data-bs-offset="0"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax:
    &amp;lt;nav&amp;gt;
        &amp;lt;div class="list-group"  id="topics"&amp;gt;
        &amp;lt;a class="list-group-item list-group-action" href="#topic1"&amp;gt; &amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/nav&amp;gt;
     &amp;lt;div data-bs-spy="scroll" data-bs-smooth-scroll="true" data-bs-target="#topics"&amp;gt;

        .... design headings with ID and content below heading scrollable...

     &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cards&lt;/strong&gt;&lt;br&gt;
Classes:&lt;br&gt;
&lt;code&gt;.card&lt;br&gt;
        .card-header&lt;br&gt;
        .card-body&lt;br&gt;
        .card-footer&lt;br&gt;
        .card-title&lt;br&gt;
        .card-subtitle&lt;br&gt;
        .card-img-top&lt;br&gt;
        .card-img-bottom&lt;br&gt;
        .card-img-overlay&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Badge&lt;/strong&gt;&lt;br&gt;
 -It is used to highlight any content in a container.&lt;/p&gt;

&lt;p&gt;Class:&lt;br&gt;
&lt;code&gt;.badge&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Toast&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is similar to alert.&lt;/li&gt;
&lt;li&gt;It can show or hide tips dynamically in page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes:&lt;br&gt;
&lt;code&gt;.toast&lt;br&gt;
        .toast-header&lt;br&gt;
        .toast-body&lt;br&gt;
        .toast-container&lt;br&gt;
        .show&lt;br&gt;
        .fade&lt;/code&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>bootstrap</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Art of Styling: A Comprehensive Guide to Cascading Style Sheets(CSS)</title>
      <dc:creator>Bhabani Sankar</dc:creator>
      <pubDate>Sun, 02 Mar 2025 05:39:24 +0000</pubDate>
      <link>https://dev.to/bhabani_sankar/the-art-of-styling-a-comprehensive-guide-to-cascading-style-sheetscss-4380</link>
      <guid>https://dev.to/bhabani_sankar/the-art-of-styling-a-comprehensive-guide-to-cascading-style-sheetscss-4380</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is CSS?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS stands for &lt;strong&gt;Cascading Style Sheets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation (look and feel) of a web page written in HTML. It defines how HTML elements should be displayed on screen, paper, or in other media.&lt;/li&gt;
&lt;li&gt;CSS saves a lot of work. It can control the layout of multiple web pages all at once.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cascading&lt;/strong&gt;: The term "cascading" refers to how styles are applied to elements in a hierarchical manner. If multiple styles apply to the same element, the "cascading" nature determines which style takes precedence. It follows a set of rules based on specificity, importance, and source order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styles&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Styles define a set of attributes that are used to make HTML more interactive and responsive.&lt;/li&gt;
&lt;li&gt;Styles use an object model to format HTML elements and make them more interactive.&lt;/li&gt;
&lt;li&gt;Object keeps all relative data and logic together.&lt;/li&gt;
&lt;li&gt;Object enables features like
a) Reusability
b) Separation
c) Extensibility
d) Maintainability
e) Testability etc..&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sheets&lt;/strong&gt;: CSS is written in separate files (stylesheets) that can be linked to HTML documents, allowing for better organization and maintainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Object is a key and value collection enclosed in a block "{  }"..&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
    Key : value;&lt;br&gt;
    Key : value;&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Key refers to style attribute name.&lt;/li&gt;
&lt;li&gt;There are various style attributes like
color, width, height, margin, padding etc..&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Styles can be defined for HTML elements in 3 ways&lt;/strong&gt;.&lt;br&gt;
a) Inline Styles&lt;br&gt;
b) Embedded Styles&lt;br&gt;
c) External Style Sheets&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inline Styles&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Styles are defined for HTML elements individually by using a "style" attribute.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1 style="color:red; font-family:Arial; border:1px solid black"&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline styles are faster in rendering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can't reuse the styles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Embedded Styles&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Styles are defined for HTML elements using  a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; container.&lt;/li&gt;
&lt;li&gt;You can embed style container in page.&lt;/li&gt;
&lt;li&gt;It enables easy reusability and extensibility.&lt;/li&gt;
&lt;li&gt;However it is slow in rendering when compared to inline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
    &lt;code&gt;&amp;lt;style&amp;gt;&lt;br&gt;
        selector&lt;br&gt;
        {&lt;br&gt;
          attribute: value;&lt;br&gt;
        }&lt;br&gt;
    &amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;External Style Sheets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can configure styles in a separate style sheet.&lt;/li&gt;
&lt;li&gt;Style sheets have extension ".css"&lt;/li&gt;
&lt;li&gt;You can link style sheet to any page.&lt;/li&gt;
&lt;li&gt;You can access styles across pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Selectors&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selector is required for styles that are defined in embedded or external file.&lt;/li&gt;
&lt;li&gt;A selector selects HTML element in page in order to apply given set of styles.&lt;/li&gt;
&lt;li&gt;Selectors are of various types&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Primary Selectors&lt;/li&gt;
&lt;li&gt;Rational or Relational Selectors&lt;/li&gt;
&lt;li&gt;Structural Selectors&lt;/li&gt;
&lt;li&gt;Attribute Selectors&lt;/li&gt;
&lt;li&gt;Dynamic Pseudo Classes&lt;/li&gt;
&lt;li&gt;Root Selector&lt;/li&gt;
&lt;li&gt;Language Selector&lt;/li&gt;
&lt;li&gt;Universal Selector  etc..&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Primary Selectors&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Type Selector&lt;/li&gt;
&lt;li&gt;ID Selector&lt;/li&gt;
&lt;li&gt;Class Selector&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Type Selector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It refers to element name.&lt;/li&gt;
&lt;li&gt;It applies styles to all occurrences of element in page.&lt;/li&gt;
&lt;li&gt;You can't ignore for any specific occurrence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
 h1, p, div, span, li&lt;br&gt;
  {&lt;br&gt;
        }&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ID Selector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every element can use an ID reference.&lt;/li&gt;
&lt;li&gt;You can configure styles using ID.&lt;/li&gt;
&lt;li&gt;ID is accessible with "#".&lt;/li&gt;
&lt;li&gt;You can choose occurrence where you want to apply the styles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
  &lt;code&gt;#text-style {&lt;br&gt;
  }&lt;br&gt;
 &amp;lt;h1  id="text-style"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every HTML element can have only one ID reference.&lt;/li&gt;
&lt;li&gt;You can't apply multiple set of styles to one element using ID.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Class Selector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is defined using class attribute.&lt;/li&gt;
&lt;li&gt;It is accessible using ".className".&lt;/li&gt;
&lt;li&gt;You can choose specific occurrence.&lt;/li&gt;
&lt;li&gt;It allows multiple inheritance.&lt;/li&gt;
&lt;li&gt;You can configure multiple classes for one element.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
 &lt;code&gt;.className{&lt;br&gt;
 }&lt;br&gt;
 &amp;lt;div  class="className1  className2  className3.."&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rational or Relational Selectors&lt;/strong&gt;:&lt;br&gt;
-These selector default with parent and child elements as well as with elements that have relation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relation like adjacent, below, above, before, after, first, last etc..&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Descendent Selector -- &lt;br&gt;
-Targets all tags under specified parent. It includes any level hierarchy.&lt;br&gt;
-It defines the parent element and the child element by using&lt;br&gt;
space.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;parentElement childElement {&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Child Selector --&lt;br&gt;
-It applies effects only to the direct child of parent element.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;Parent &amp;gt; child {&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Adjacent --&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines effects to an element which is specified immediately
after current element.&lt;/li&gt;
&lt;li&gt;It is not parent and child, it is one below another.&lt;/li&gt;
&lt;li&gt;It will apply only to the first adjacent element.
Syntax:
&lt;code&gt;FirstElement + adjacentElement
{
}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;General --&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines effects to all elements which are specified after the
current element.
Syntax:
&lt;code&gt;FirstElement ~ AdjacentElements
{
}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Attribute Selectors&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Several elements in HTML are presented by using attribute of tag.
&lt;code&gt;&amp;lt;input type="button"&amp;gt;
&amp;lt;input type="radio"&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;“type” is attribute.&lt;/li&gt;
&lt;li&gt;We have to apply effects based on attribute and value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;code&gt;tagName[“attribute”] { }&lt;br&gt;
tagName[“attribute=value”] { }&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attribute selectors can be defined with conditions.&lt;/li&gt;
&lt;li&gt;Effects are applied only to attribute that match the given condition.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[attribute="val"] &lt;br&gt;
-- Equal specifies that it should be exact match.&lt;/p&gt;

&lt;p&gt;[attribute^="val"] &lt;br&gt;
-- It refers the value starting with specified term.&lt;/p&gt;

&lt;p&gt;[attribute$="val"] &lt;br&gt;
-- It specifies that the value ending with given term.&lt;/p&gt;

&lt;p&gt;[attribute*="val"] &lt;br&gt;
-- It matches the term at any location.&lt;/p&gt;

&lt;p&gt;[attribute|="val"] &lt;br&gt;
-- Name starts with specified term and separated with "-".&lt;/p&gt;

&lt;p&gt;[attribute~="val"] &lt;br&gt;
-- Name start with specified term and contain blank space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Pseudo-Classes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dynamic indicates that the effect can change according to state and
situation.&lt;/li&gt;
&lt;li&gt;Pseudo indicates that it is not referring to exactly the element which is
having the same name as selector name.&lt;/li&gt;
&lt;li&gt;The selector name and the element if effects may differ.
Syntax:
&lt;code&gt;link - not &amp;lt;link&amp;gt; element, it refers to &amp;lt;a&amp;gt;
class/Id/type: pseudoClass {
}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;:link -- Specifies effect for Hyperlink.&lt;br&gt;
:visited -- It defines effects for visited links.&lt;br&gt;
:hover -- It defines effects when mouse pointer is over element.&lt;br&gt;
:active -- It defines effects when link is in active state.&lt;br&gt;
:focus -- It defines effects when element get focus.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Element:Link { }
#heading:hover {}
.txtName:focus { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Target pseudo class --&lt;br&gt;
:target :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines effects to any element when it becomes target of a link.&lt;/li&gt;
&lt;li&gt;You can implement in intra document navigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Element state pseudo-classes --&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element state indicates the state of element like enabled, disables, readonly,checked.
:enabled -- It defines effects when element is enabled.
:disabled -- It defines effects when element is disabled.
:read-only -- It defines effects when element is set to read-only.
:checked -- It defines effects when element is checked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Element validation state pseudo classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML 5 provides pre-defined form validations like require, email, url, pattern etc.&lt;/li&gt;
&lt;li&gt;CSS can use HTML 5 validations to verify the state valid or not and can apply effects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;:valid -- It defines effects for element if is value is valid against the&lt;br&gt;
validation defined. Validation can be verified by using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minlength&lt;/li&gt;
&lt;li&gt;Maxlength&lt;/li&gt;
&lt;li&gt;Required&lt;/li&gt;
&lt;li&gt;Pattern&lt;/li&gt;
&lt;li&gt;Email&lt;/li&gt;
&lt;li&gt;URL etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;:invalid -- It defines effect for element when it is invalid.&lt;br&gt;
:in-range -- It defines effects for element when input value is within the specified range.&lt;br&gt;
:out-of-range -- It defines effects for element when input value is out of given range.&lt;br&gt;
-Range is verified with “min and max” values defined for input&lt;br&gt;
element.&lt;br&gt;
:required -- It defines effects to element when it verified with required&lt;br&gt;
error.&lt;br&gt;
-It is not validating required, It is just verifying whether the required defined or not.&lt;br&gt;
:optional --If it is not defined with required validation then it is treated as optional.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structural Selectors&lt;/strong&gt;:&lt;br&gt;
-You can target your effects based on the position of element in parent and child hierarchy.&lt;/p&gt;

&lt;p&gt;:first-child -- It defines effects only for first child element.&lt;br&gt;
:last-child -- It defines effects only for last child element.&lt;br&gt;
:nth-child(LevelNumber) -- It defines effects only to specific child element that occurs at given level.&lt;br&gt;
-Level number starts with 1.&lt;br&gt;
-Index number starts with 0.&lt;br&gt;
-You can also define the pre-set values like ‘even &amp;amp; odd’ to apply effects based on even and odd occurrences.&lt;br&gt;
:nth-of-type(LevelNumber[n]) -- It will repeat the effect for every nth occurrence.&lt;br&gt;
:nth-of-type(2n) -- It will repeat the effect for every 2nd occurrence.&lt;br&gt;
:nth-of-type(2n+startNumber) -- It will start with specific level.&lt;br&gt;
:nth-last-of-type(n) -- It will apply effect for every nth occurrence from bottom.&lt;br&gt;
:nth-last-child(n) -- It will apply from bottom without repeating.&lt;br&gt;
:root -- It refers to root of document, which is 'body'.&lt;br&gt;
:empty -- If any element is empty, without any content then its will define the given effects.You can configure for containers like &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;dd&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pseudo-Element Selectors&lt;/strong&gt;:&lt;br&gt;
::first-line -- Effects for first line in paragraph.&lt;br&gt;
::first-letter -- Effects for first character.&lt;br&gt;
::before -- Effect or content to add before the current element.&lt;br&gt;
::after -- Effect or content to add after the current element.&lt;br&gt;
::placeholder -- It will apply effects for placeholder.&lt;br&gt;
::selection -- It will apply effects for selection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Language Selector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It defines effects based on lang configured for element.&lt;/li&gt;
&lt;li&gt;If you page is multi lingual then you can define effects to content based on specific
language.
&lt;code&gt;":lang()"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Universal Selector&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is defined by using "*" that represents all.&lt;/li&gt;
&lt;li&gt;It apply effects to all elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Comments&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comments are used to explain the code, and may help when you edit the source code at a later date.&lt;/li&gt;
&lt;li&gt;Comments are ignored by browsers.&lt;/li&gt;
&lt;li&gt;A CSS comment is placed inside the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt;element, and starts with &lt;code&gt;/* and ends with */&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can add comments wherever you want in the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Colors&lt;/strong&gt;:&lt;br&gt;
CSS Colors&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colors in CSS can be defined by using 3 techniques.&lt;/li&gt;
&lt;li&gt;Color Name&lt;/li&gt;
&lt;li&gt;Hexadecimal color code&lt;/li&gt;
&lt;li&gt;RGB Color methods.&lt;/li&gt;
&lt;li&gt;CSS supports 16 million colors.&lt;/li&gt;
&lt;li&gt;Standard color names are few.&lt;/li&gt;
&lt;li&gt;You can directly define the color name or color shade name.
Syntax:
&lt;code&gt;h2{
color:green;
}
h2{
color:lightgreen;
}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hexadecimal color code&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The primary colors are “Red, Green &amp;amp; Blue”.&lt;/li&gt;
&lt;li&gt;All colors are derived from primary colors.&lt;/li&gt;
&lt;li&gt;Hexadecimal allows to define multiple color shades.&lt;/li&gt;
&lt;li&gt;Hexadecimal colors have a combination or 3 or 6 chars with prefix “#”&lt;/li&gt;
&lt;li&gt;Hexadecimal number system is 16 base number system.&lt;/li&gt;
&lt;li&gt;We use 16 different values to mix and create a color shade.&lt;/li&gt;
&lt;li&gt;Hexadecimal color code uses the values 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f&lt;/li&gt;
&lt;li&gt;0 is minimum and f is maximum.&lt;/li&gt;
&lt;li&gt;Color code have 3 or 6 places other than #&lt;/li&gt;
&lt;li&gt;If it is 3 then “#RGB”
R - Red value
G - Green value
B - Blue value&lt;/li&gt;
&lt;li&gt;Red, Green and Blue will have 1 place representation.
Syntax:
&lt;code&gt;&amp;lt;style&amp;gt;
input {
background-color: #af0;
}
&amp;lt;/style&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If it is 6 places then “#RRGGBB”.&lt;/li&gt;
&lt;li&gt;Red, green and blue values will have 2 places.
Syntax:
&lt;code&gt;&amp;lt;style&amp;gt;
input {
background-color: #dddddd;
}
&amp;lt;/style&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;RGB color code&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The colors are defined with “Red, Green and Blue” combination.&lt;/li&gt;
&lt;li&gt;The method “rgb()” is used for RGB colors.&lt;/li&gt;
&lt;li&gt;It takes 3 values “rgb(redValue, greenValue, blueValue)”&lt;/li&gt;
&lt;li&gt;The value range for red, green and blue will be between 0 to 255.
Syntax:
rgb(0,0,255) blue color
rgb(255,0,0) Red color&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ex:&lt;br&gt;
&lt;code&gt;&amp;lt;style&amp;gt;&lt;br&gt;
input {&lt;br&gt;
background-color:rgb(205,123,215);&lt;br&gt;
}&lt;br&gt;
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;RGBA (Red, Green, Blue, Alpha)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alpha is for opaque 1.0 is full opaque&lt;/li&gt;
&lt;li&gt;Range between 0.0 to 1.0
&lt;code&gt;&amp;lt;style&amp;gt;
input {
background-color:rgba(255, 0, 0, 0.3);
}
&amp;lt;/style&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Units&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Units define size and position.&lt;/li&gt;
&lt;li&gt;You can configure size with: height and width.&lt;/li&gt;
&lt;li&gt;You can configure position with: x-axis, y-axis and z-axis.&lt;/li&gt;
&lt;li&gt;The CSS units are categorized into 2 groups.
-- Absolute Length Units
-- Relative Length Units&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Absolute Length Units :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are not relative to anything else and are generally considered as normal units.&lt;/li&gt;
&lt;li&gt;These are not affected by other relative elements and their units.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aa8a98dove3fiz5v6w0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aa8a98dove3fiz5v6w0.png" alt="Image description" width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relative length units&lt;/strong&gt;:&lt;br&gt;
Relative length units:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;These are related to other contents in the page.&lt;/li&gt;
&lt;li&gt;The size of any element can be determined based on its parent, child or adjacent.&lt;/li&gt;
&lt;li&gt;The advantages are when parent element size is changed will relatively affects the child element also.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;em -- It uses the font size of parentelement and applies to current element.&lt;br&gt;
ex -- X- height of elements’ font [width]&lt;br&gt;
ch -- Defined for width, with regard to the root element.&lt;br&gt;
rem -- Font size to the root element size.&lt;br&gt;
ln -- Line height of the element.&lt;br&gt;
vw -- 1% of the viewport’s width.&lt;br&gt;
vh -- 1% of the viewport’s height.&lt;br&gt;
vmin -- 1% of the viewport’s smaller dimension.&lt;br&gt;
vmax --1% of the viewport’s larger dimension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cascading Rules&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a set of effects are re-defined for same element with same type of selector then according to CSS rule the last set of effects are applied to element.&lt;/li&gt;
&lt;li&gt;If element have to choose between type selector and class selector then it will always choose the "class selector".&lt;/li&gt;
&lt;li&gt;If element is configured with both ID and class selector then always ID selector related effects are applied to element.&lt;/li&gt;
&lt;li&gt;If different style attributes are defined in ID, Class and Type selectors and applied to any specific element. Then then all styles are applied to element. Only same name style attributes are overridden.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS 2D Transforms&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS 2D Transform feature allows the element to be transformed in 2-Dimensional space.&lt;/li&gt;
&lt;li&gt;2D is along X-Axis and Y-Axis.&lt;/li&gt;
&lt;li&gt;CSS provides “transform” property to defined transformations.&lt;/li&gt;
&lt;li&gt;CSS transforms are not supported on various browsers.&lt;/li&gt;
&lt;li&gt;You have to use special plug-in for different browsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Various transforms provided by CSS are&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;translate()&lt;/strong&gt;-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to move the element from its current position to a new position along x and y axis.
Syntax:
&lt;code&gt;transform:translate(xPixels, yPixels);
transform:translateX(pixels);
transform:translateY(pixels);&lt;/code&gt;
Note: Transformation happens in just one second, you can set timing for transformation by using "transition" attribute.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;scale()&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to increase or decrease the size of element along x and y axis.&lt;/li&gt;
&lt;li&gt;You can control the height and width of element.
Syntax:
&lt;code&gt;transform:scale(scaleX, scaleY);
transform:scaleX()
transform:scaleY()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Scale units are defined in fractions
-- 1 = 100
-- 1.5 = 150
-- 2 = 200
Syntax:
&lt;code&gt;transform:scale(2) // both x and y will be 200
transform:scale(2,1) // x will be 200 and y 100
transform:scaleX(2) // x will be 200
X = width
Y = height&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Skew()&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Skew is used to tilt the image by specified angle.
Syntax:
&lt;code&gt;transform:skew(sx, sy)
transform:skewX(angle)
transform:skewY(angle)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;angle clockwise: 0 to 360&lt;br&gt;
angle counter clockwise: -360&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rotate()&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It rotates the element around its origin.&lt;/li&gt;
&lt;li&gt;It uses value defined in deg.&lt;/li&gt;
&lt;li&gt;It uses 0 to 360 deg angle&lt;/li&gt;
&lt;li&gt;You can use -ve value for counter clockwise.
Syntax:
&lt;code&gt;transform:rotate(‘angle’);
transform:rotateX()
transform:rotateY()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Transform Matrix&lt;/strong&gt;:&lt;br&gt;
-- Matrix allows to define all 2D transforms to single element.&lt;br&gt;
-- The transform methods&lt;br&gt;
-- translate(x,y)&lt;br&gt;
-- translateX()&lt;br&gt;
-- translateY()&lt;br&gt;
-- scale(x,y)&lt;br&gt;
-- scaleX()&lt;br&gt;
-- scaleY()&lt;br&gt;
-- rotate()&lt;br&gt;
-- rotateX()&lt;br&gt;
-- rotateY()&lt;br&gt;
-- skew()&lt;br&gt;
-- skewX()&lt;br&gt;
-- skewY()&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;matrix(scaleX(), skewY(), skewX(), scaleY(),&lt;br&gt;
translateX(), translateY())&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS 3D Transforms&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS 3D transforms allows 3-Dimensional design.&lt;/li&gt;
&lt;li&gt;It will have configuration for X, Y and Z axis.&lt;/li&gt;
&lt;li&gt;The methods used for 3D are same as 2D but comprises of 3rd Dimension.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Translate3d()&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It sets the position of element along x, y and z axis.
Syntax:
&lt;code&gt;translate3d(tx, ty, tz)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scale3d&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It changes the image size in 3 dimensions.
Syntax:
&lt;code&gt;scale3d(x, y, z)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Text Styling&lt;/strong&gt;:&lt;br&gt;
Font Styling :-&lt;br&gt;
-It provides a set of attributes and values that are used to&lt;br&gt;
format the text.&lt;br&gt;
color -- Defines the foreground color.&lt;br&gt;
font-family -- It defines the font family name like: Arial&lt;br&gt;
font-size -- It defines the text size.&lt;br&gt;
font-weight -- Defines normal, bold, lighter, bolder.&lt;br&gt;
font-style -- Defines italic effect.&lt;br&gt;
text-transform -- Defines uppercase, lowercase, capitalize, full-width. [affects the font size]&lt;br&gt;
text-decoration -- Defines underline, overline, line- through.&lt;br&gt;
-It is short had for various text decoration options like style of line, color of line etc.&lt;br&gt;
-- text-decoration-color&lt;br&gt;
-- text-decoration-style&lt;br&gt;
-- text-decoration-line&lt;br&gt;
text-shadow -- It defines a shadow for text.&lt;br&gt;
text-align -- Left, center, right and justify&lt;br&gt;
line-height -- Space between lines.&lt;br&gt;
letter-spacing -- Space between letters.&lt;br&gt;
word-spacing -- Space between words.&lt;br&gt;
font-variant -- Caps, lowercase. [Without effecting the height of text it will change to caps]&lt;br&gt;
text-indent -- First line spacing.&lt;br&gt;
text-overflow -- Control the wrapping of text.&lt;br&gt;
white-space -- Control the blank space.&lt;br&gt;
direction -- Text direction&lt;br&gt;
text-orientation -- Changes the orientation of text.&lt;/p&gt;

&lt;p&gt;Ex: Font, Font Style, Color, Text Decoration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;Text Effects&amp;lt;/title&amp;gt;
&amp;lt;style&amp;gt;
div{
color:red;
font-family: Arial;
font-size: 4em;
font-weight: bold;
font-style: italic;
text-transform: uppercase;
text-decoration: underline;
text-decoration-color: blue;
text-decoration-style: wavy;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div&amp;gt;sample text&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS Box Model&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everything in CSS has a box around it.&lt;/li&gt;
&lt;li&gt;Understanding boxes is important for designing layout.&lt;/li&gt;
&lt;li&gt;It is often called as “Box Model”.&lt;/li&gt;
&lt;li&gt;Box model comprises of
Content Box -- The area where your content is displayed. It can be defined by using "height and width" attributes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Padding Box -- The padding is around the content as white space. Its size can be controlled by using  "padding".&lt;/p&gt;

&lt;p&gt;Border Box -- The border box warps around the content or padding. It is controlled by using "border" property.&lt;/p&gt;

&lt;p&gt;Margin Box -- The margin is the outmost layer wrapping the content, padding and border. It configures a white space around border. It is defined by using “margin”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkas5syhjbibd3mmtd8f1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkas5syhjbibd3mmtd8f1.png" alt="Image description" width="527" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Margins, Padding and Border&lt;/strong&gt;:&lt;br&gt;
&lt;strong&gt;Margin&lt;/strong&gt;&lt;br&gt;
-- It specifies the space around border.&lt;br&gt;
-- You define by using following properties.&lt;br&gt;
-- margin [short hand – sets in all directions].&lt;br&gt;
-- margin-top.&lt;br&gt;
-- margin-bottom.&lt;br&gt;
-- margin-left.&lt;br&gt;
-- margin-right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Padding&lt;/strong&gt;&lt;br&gt;
-- It specifies the space around content.&lt;br&gt;
-- You can define&lt;br&gt;
-- Padding-left.&lt;br&gt;
-- Padding-right.&lt;br&gt;
-- Padding-top.&lt;br&gt;
-- Padding-bottom.&lt;br&gt;
-- Padding. (All options are similar like margin)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Transition&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS transition is a module of CSS.&lt;/li&gt;
&lt;li&gt;Transition is used for configuring animation for initial and final state.&lt;/li&gt;
&lt;li&gt;Initial state is before transformation.&lt;/li&gt;
&lt;li&gt;Final State is after transformation.
-You can control the behaviour using various CSS effects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-- timing&lt;br&gt;
-- duration&lt;br&gt;
-- other attributes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS Transition comprises of following
properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-- transition&lt;br&gt;
-- transition-delay&lt;br&gt;
-- transition-duration&lt;br&gt;
-- transition-property&lt;br&gt;
-- transition-timing-function&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;transition-delay : Delay is time taken to start animation.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;transition-delay: 2s;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;transition-duration : Time take to complete the transformation.Specifies the duration from initial to final and vice versa.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;transition-duration: 5s;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;transition-property : You can define several effects for transformation.&lt;br&gt;
-All effects are transformed from initial to final.&lt;br&gt;
-You can define only the effect that you want to transform by using transform-property.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;code&gt;transition-property: width,&lt;br&gt;
height;&lt;br&gt;
transition-property:all;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;transition-timing-function : CSS provides a set of pre-defined animations functions which you can apply to content.&lt;br&gt;
-These effects have pre-defined timings and behaviour.&lt;br&gt;
-The transition timing functions are&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;linear: speed will be even from begin to end.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ease-in: starts slowly and increases towards end.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ease-out: starts quickly and slow down.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ease-in-out&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;steps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;jump-start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;jump-end&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;jump-none&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;jump-both&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;end&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step-start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step-end&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Animations&lt;/strong&gt;:&lt;br&gt;
-- CSS animations are used to animate CSS transitions.&lt;br&gt;
-- You can reduce the use of JavaScript and Flash for animation.&lt;br&gt;
-- Animation can easily run on low bandwidth devices like mobiles, tabs.&lt;br&gt;
-- Animation will work even when JavaScript is disabled or flash plugin is not available.&lt;br&gt;
-- To create CSS animation, we need&lt;br&gt;
-- @keyframes&lt;br&gt;
-- animation&lt;br&gt;
-- animation-name&lt;br&gt;
-- animation-duration&lt;br&gt;
-- animation-timing-function&lt;br&gt;
-- animation-delay&lt;br&gt;
-- animation-iteration-count&lt;br&gt;
-- animation-direction&lt;br&gt;
-- animation-fill-mode&lt;br&gt;
-- animation-play-state&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;@Keyframes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is used to configure every frame in animation.&lt;/li&gt;
&lt;li&gt;At each frame we can define effects for object.&lt;/li&gt;
&lt;li&gt;Keyframes are defines with initial, final, and intermediate steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes identifierName
{
from { effects for initial state }
to { effects for final state }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Keyframes are applied to any element by using "animation-name" property
Syntax:
&lt;code&gt;P {
animation-name:
keyframeIdentifierName;
}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You can control the iteration count, the number of times to display by using "animation-iteration-count"&lt;/li&gt;
&lt;li&gt;You can control animation direction by using "animation-direction"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CSS Position&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generally, elements are placed according to the document layout flow.&lt;/li&gt;
&lt;li&gt;Position allows to make element behave differently and take them out of the document flow.&lt;/li&gt;
&lt;li&gt;CSS Positions are defined by using “position” style attribute.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Static Position&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is according to the normal flow of document.&lt;/li&gt;
&lt;li&gt;It is the default position for every element.&lt;/li&gt;
&lt;li&gt;It will not have any effect on the element position.&lt;/li&gt;
&lt;li&gt;Static position is not affected by top, right, bottom, left and z-index attributes.
Ex:
&lt;code&gt;p {
position: static;
right: 10px;
}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sticky Position&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element is positioned according to the normal flow of document.&lt;/li&gt;
&lt;li&gt;It can make the content sticky after scrolling to the specified margin.&lt;/li&gt;
&lt;li&gt;It required the margins to define and position by using left, right, top or bottom.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fixed Position&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The element is removed from normal document flow.&lt;/li&gt;
&lt;li&gt;Element is no longer a part of DOM flow.&lt;/li&gt;
&lt;li&gt;Its position is fixed with left, right, top and bottom attributes.&lt;/li&gt;
&lt;li&gt;It will not move from the position defined.&lt;/li&gt;
&lt;li&gt;It locks the component at fixed position on page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Relative Position&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It according to the normal document flow.&lt;/li&gt;
&lt;li&gt;Its position will be relative to adjacent or parent element.&lt;/li&gt;
&lt;li&gt;It is from the parent or from adjacent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Position Absolute&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The element is removed from the normal document flow.&lt;/li&gt;
&lt;li&gt;It is positioned relative to its closest element.&lt;/li&gt;
&lt;li&gt;It is affected by using left, right, top and bottom values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;As you apply these techniques, your CSS skills will continue to grow, opening doors to endless design possibilities.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Thank you for taking the time to read this article. I hope it has helped you on your CSS journey!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>css</category>
    </item>
    <item>
      <title>The Ultimate Guide to HTML: From Fundamentals to Advanced Techniques</title>
      <dc:creator>Bhabani Sankar</dc:creator>
      <pubDate>Mon, 30 Dec 2024 18:44:44 +0000</pubDate>
      <link>https://dev.to/bhabani_sankar/the-ultimate-guide-to-html-from-fundamentals-to-advanced-techniques-109o</link>
      <guid>https://dev.to/bhabani_sankar/the-ultimate-guide-to-html-from-fundamentals-to-advanced-techniques-109o</guid>
      <description>&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt; (&lt;strong&gt;HyperText Markup Language&lt;/strong&gt;) is the standard language used to create and design websites and web applications. It structures the content on the web by using a system of elements, tags, and attributes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.The Birth of HTML&lt;/strong&gt;&lt;br&gt;
HTML was invented by Tim Berners-Lee, a British computer scientist, in 1989 while working at CERN (European Organization for Nuclear Research). He proposed the idea of a "hypertext system" that would allow researchers to share and access documents over the internet.&lt;/p&gt;

&lt;p&gt;In 1991, Berners-Lee created the first version of HTML, which included just 18 tags. These tags allowed the creation of simple documents with hyperlinks (which is why it’s called HyperText) and basic formatting. This marked the birth of the World Wide Web. Tim Berners-Lee introduced HTML as a way to format documents and hyperlinks on the web.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.HTML 2.0 (1995)&lt;/strong&gt;&lt;br&gt;
As the internet began to grow rapidly, the need for a standardized version of HTML arose. In 1995, the Internet Engineering Task Force (IETF) formed a working group to standardize HTML, leading to the release of HTML 2.0. HTML 2.0 was the first version to be formally standardized and included all the basic elements necessary for web documents. It supported text, images, tables, forms, and links but was still quite limited in terms of formatting and layout capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.HTML 3.2 and HTML 4.0 (1997 - 1999)&lt;/strong&gt;&lt;br&gt;
By 1997, HTML had become more widely used, and the World Wide Web Consortium (W3C), led by Tim Berners-Lee, took over the development and standardization of HTML. HTML 3.2 (1997): This version introduced table-based layout, the  tag, and other presentational elements. It was a major step forward for web design, although still lacking in advanced styling features.&lt;/p&gt;

&lt;p&gt;HTML 4.0 (1999): This version was a significant upgrade, emphasizing separation of content and presentation. HTML 4.0 encouraged web developers to use CSS (Cascading Style Sheets) for layout and design, which improved accessibility and usability. HTML 4.0 also introduced features like:&lt;br&gt;
New semantic elements such as &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; (though they would become more relevant in later versions). Internationalization support (with support for different languages). Scripting support with &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags for JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.HTML 5 (2014)&lt;/strong&gt;&lt;br&gt;
HTML5 is the most significant update to HTML, introduced to meet the growing demands of modern web applications, multimedia content, and mobile devices.&lt;br&gt;
Key Features Introduced in HTML5:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New Semantic Elements&lt;/strong&gt;: HTML5 added more meaningful elements for better document structure, such as: &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt;, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multimedia Support&lt;/strong&gt;: HTML5 introduced new elements like:- &lt;code&gt;&amp;lt;audio&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; for embedding multimedia directly into web pages without needing plugins like Flash. &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; for dynamic, scriptable rendering of 2D shapes and bitmap images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Offline Capabilities&lt;/strong&gt;: HTML5 added support for offline web applications with features like:-Local storage and IndexedDB to store data on the client side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Form Controls&lt;/strong&gt;: New input types were introduced, including date, email, number, and range to improve user input and form validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API Support&lt;/strong&gt;: HTML5 included many JavaScript APIs for geolocation, local storage, web workers, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better Mobile Support&lt;/strong&gt;: HTML5 was designed to be mobile-friendly, ensuring that websites could be easily viewed on smartphones and tablets.&lt;/p&gt;

&lt;p&gt;HTML5 marked the transition to web apps and interactive websites, as it offered features that eliminated the need for many third-party plugins (like Flash and Java applets).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. HTML Today&lt;/strong&gt;&lt;br&gt;
After HTML5, there was no formal "HTML 6." Instead, HTML has transitioned into a living standard under the stewardship of the Web &lt;strong&gt;Hypertext Application Technology Working Group&lt;/strong&gt; (&lt;strong&gt;WHATWG&lt;/strong&gt;).This living standard approach means HTML is continuously evolving, with regular updates and improvements.New features are introduced as necessary, based on the needs of modern web applications and the web development community.&lt;/p&gt;
&lt;h2&gt;
  
  
  HTML Structure
&lt;/h2&gt;

&lt;p&gt;HTML documents are structured hierarchically, with elements containing other elements. Here's a basic breakdown of an HTML document structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;HTML Basics&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Welcome to HTML!&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;This is a simple HTML document.&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;: Declares the document type and version of HTML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;: The root element that contains all the HTML content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;: Contains metadata such as the title, character set, and external links.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;: Contains the visible content of the page like text, images, and links.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML Elements and Tags&lt;/strong&gt; :&lt;br&gt;
HTML uses elements that are enclosed in tags. An element can contain other elements, text, or attributes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tags: Elements are wrapped in angle brackets, e.g., &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opening Tag: &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; (start of an element).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Closing Tag: &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; (end of an element).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Content: The content goes between the opening and closing tags.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Empty Tags: Some elements don’t have closing tags, such as &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common HTML Tags&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headings&lt;/strong&gt;: &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; tags represent headings, with &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; being the most important and &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; the least.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is a most important heading&amp;lt;/h1&amp;gt;
&amp;lt;h6&amp;gt;This is a lest important heading&amp;lt;h6&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paragraphs&lt;/strong&gt;: &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; is used to define paragraphs.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph of text.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Links&lt;/strong&gt;: &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; is used to create hyperlinks.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="https://dev.to"&amp;gt;Dev.to&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These links are used to navigate the user into different addresses/references. These links are generated by anchor tag. anchor tag denoted with 'a'.We can even keep one element inside another element called as "nested elements".eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt; for more content like,share and subsctibe &amp;lt;a href="https://youtube.com"&amp;gt;fb&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we can even navigate to mail using 'mailto:mailid' or telephone using 'tel:number' or watsapp using 'wa.me/number'&lt;/p&gt;

&lt;p&gt;To open anchor links in new tab , we use attribute target and set value = "_blank"&lt;br&gt;
eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="https://dev.to" target="_target"&amp;gt;click for Dev.to&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Images&lt;/strong&gt;: &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; is used to display images.But img is a self closing tag. self closing tags are the tags which do not have closed tags.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;img src="image.jpg" alt="Description of Image"&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;img have following attributes:&lt;br&gt;
  src -- used to keep links/path of images source.&lt;br&gt;
  alt -- it describes alternative text for image and it works only when &lt;br&gt;
          src is not works.&lt;br&gt;
  height -- used to mention height of the image.&lt;br&gt;
  width -- used to mention width of the image.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lists&lt;/strong&gt;:
Lists are used to list out certain items either ordered or unordered. eg: grocery list,expenditure list,books list, students list,todo lists,results,contact list some lists have order and some don't.
In HTML, lists are classified as 3 types :&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;1.&lt;strong&gt;ordered list&lt;/strong&gt; : ordered lists are used to list out certain items in an order.HTML uses 'ol' tag for ordered lists.Inside ol, each list item denoted by 'li' tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ol&amp;gt;
    &amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Item 2&amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;unordered list&lt;/strong&gt;: unordered lists are to lists out items in which order is not necessry.unordered lists uses 'ul' tag and each list item is 'li'&lt;br&gt;
Type of the unordered list can be done similary as ordered but not recommanded.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ul&amp;gt;
    &amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;Item 2&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.&lt;strong&gt;Definition list&lt;/strong&gt;: These lists are used to define certain statements or events, changelog,timline etc.., They uses 'dl' tag.&lt;br&gt;
Each item will have 2 properties&lt;br&gt;
dt- definition term&lt;br&gt;
dd - definition data&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tables&lt;/strong&gt;:
Tables are used to represent the data in rows and columns. Eg: crickbuzz, screener, school/college time tables...etc.
Horizontal lines of information is called row,Vertical lines of information is called column.
tables are created by 'table' tag
each table have rows, which are created by 'tr' tag
each row contains either heading or data , which are created by 'th' or 'td' tags&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Formatting Tags :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/bhabani_sankar/html-formatting-28jf"&gt;Click here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Element&lt;/strong&gt; :&lt;br&gt;
An element is nothing but content with open and closed tags.&lt;br&gt;
&lt;code&gt;&amp;lt;h1&amp;gt;heading&amp;lt;/h1&amp;gt;&lt;/code&gt;  -- h1 element&lt;br&gt;
Elements are two types:&lt;br&gt;
 i. &lt;strong&gt;block element&lt;/strong&gt;: block element will not allow any other element beside.&lt;br&gt;
 blocks element also have height and width&lt;br&gt;
 Eg: h1 to h6, p, div etc..,&lt;br&gt;
 ii. &lt;strong&gt;in-line element&lt;/strong&gt;: inline element will allow other elements beside. &lt;br&gt;
 inline elements also not have height and width&lt;br&gt;
 Eg: a, img, span&lt;/p&gt;

&lt;p&gt;div and span are container elements, they are used to wrap certain elements as a group.&lt;/p&gt;

&lt;p&gt;div is a general block container element.&lt;br&gt;
 span is a genral inline container element.&lt;/p&gt;

&lt;p&gt;** Class and id's** :&lt;br&gt;
 we can specify a class name or id name to any element to identify  the element.class names can be multiple and multiple elements can have same class name.id names will be always unique or singular.&lt;br&gt;
&lt;code&gt;&amp;lt;element class="classname" id="idname"&amp;gt;&amp;lt;/element&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic elements&lt;/strong&gt; :&lt;br&gt;
sematic elements are introduced to make meaningful HTML which is easily understand by search engines. This practice is good for better SEO(Search Engine Optimation). semantic elements will not change any UI.&lt;br&gt;
 Most used semanti elements are:&lt;br&gt;
    header, main, footer, nav, aside, section, article, thead, tbody, tfoot, address, figure, picture etc...&lt;/p&gt;
&lt;h2&gt;
  
  
  Media :
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Audio&lt;/strong&gt;--audio's are used to keep audio track files into webpage. it uses audio tag and for source it uses source tag. we can use flags like autoplay,controls to make audio plays automatically and contains controls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Video&lt;/strong&gt;--video's are used to show the media to user. To keep video into webpage, we can use video and for source, it uses source tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Iframe&lt;/strong&gt; --Iframe is used to embedany 3rd party media into your website.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;iframe src=""&amp;gt;&amp;lt;/iframe&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Figure&lt;/strong&gt;--Figure is used to display images with its captions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;figure&amp;gt;
   &amp;lt;img src="" alt=""/&amp;gt;
   &amp;lt;figcaption&amp;gt;caption&amp;lt;/figcaption&amp;gt;
 &amp;lt;/figure&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Picture&lt;/strong&gt; :&lt;br&gt;
Picture is used to add responsive images to web page(means different images for different devices).it works with source tag containing media queries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;picture&amp;gt;
  &amp;lt;source media=""&amp;gt;
  &amp;lt;source media=""&amp;gt;
  &amp;lt;img /&amp;gt;
&amp;lt;/picture&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Forms :
&lt;/h2&gt;

&lt;p&gt;forms are used to collect user's data such as name,email,phone_number etc..,Eg: login, registration, feedback,contact,admission, attendance form, messages,subscribe,search, forgot password etc...,To take user's data we can use a self closing element named 'input', Every input will have following attributes:&lt;br&gt;
&lt;strong&gt;type&lt;/strong&gt;: it defines the type of input it can take.&lt;br&gt;
&lt;strong&gt;placeholder&lt;/strong&gt;: Dummy text to hold the place until actual value comes.&lt;br&gt;
&lt;strong&gt;id&lt;/strong&gt; : used to identify the input uniquely.&lt;br&gt;
&lt;strong&gt;name&lt;/strong&gt; : name is the variable by which value is sent to server.&lt;br&gt;
&lt;strong&gt;Label Tag&lt;/strong&gt;: label is used to select certain elements and it needed to be connected with input's id (for attribute) form tag also have attributes such as : &lt;br&gt;
   -- &lt;strong&gt;action&lt;/strong&gt;: contains the path of server(where the form to be submitted).&lt;br&gt;
   -- &lt;strong&gt;method&lt;/strong&gt;: it defines the way to send the values.&lt;br&gt;
       --- &lt;strong&gt;GET&lt;/strong&gt;: get shows all the values in  URL.&lt;br&gt;
       --- &lt;strong&gt;POST&lt;/strong&gt;: post will not show the values in the URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Types&lt;/strong&gt;: There are different types of inputs such as&lt;br&gt;
  i. text: text is used for alphanumerical inputs.&lt;br&gt;
  ii. email: email is used for email inputs.&lt;br&gt;
  iii. password: password is used for secret keys,pins,password etc..,&lt;br&gt;
  iv. url: url is used to input links of http/https;&lt;br&gt;
  v. number: number is used to input the only numerical values.&lt;br&gt;
  vi. date: date is used to input date using default calender.&lt;br&gt;
  vii. time: time is used to input time using default timer.&lt;br&gt;
  viii. datetime-local: it is used to input date and time at a time.&lt;br&gt;
  ix. week : it is used to input week of the year.&lt;br&gt;
  x. month : it is used to input the month of the year.&lt;br&gt;
  xi. file: file is used to upload certain files.&lt;br&gt;
  xii. hidden : hidden is used to hide the input.&lt;br&gt;
  xiii. button: button is used to include buttons of different variations.&lt;br&gt;
        submit: submit is used to submit the form.&lt;br&gt;
        reset: reset is used to reset the form .&lt;br&gt;
  xiv.color: color is used to select specific colours.&lt;br&gt;
  xv. range: range is used to get range slider.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Radio buttons&lt;/strong&gt;: radio buttons are used to select only one out of the choices. In radio buttons, all same purpose radio buttons should have same name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="radio" name="answer" value="yes&amp;gt;
&amp;lt;input type="radio" name="answer" value="no"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Checkboxes&lt;/strong&gt;: checkboxes are used to select one or more values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="checkbox" name="" id="" value=""&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;all names of same purpose checkboxes should  be same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dropdowns&lt;/strong&gt;: Drop Downs are used to select one or more values.&lt;br&gt;
it uses 'select' tag where each option is a 'option' tag&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;select&amp;gt;
&amp;lt;option value=" "&amp;gt; &amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  HTML Validation
&lt;/h2&gt;

&lt;p&gt;HTML validation is the process of checking whether an HTML document follows the syntax and rules defined by the HTML specification (such as HTML5, HTML4, or XHTML). It helps ensure that a webpage is properly structured and can be rendered correctly by browsers. Validation also plays a significant role in improving accessibility, search engine optimization (SEO), and web performance.&lt;/p&gt;

&lt;p&gt;HTML5 Validation Methods:&lt;br&gt;
With HTML5, validation has become easier, thanks to new form elements and input types that allow better client-side validation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Required Fields&lt;/strong&gt; :
HTML5 introduces the &lt;strong&gt;required&lt;/strong&gt; attribute, which ensures that a user fills in a form field before submitting it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
  &amp;lt;input type="text" name="username" required&amp;gt;
  &amp;lt;input type="submit" value="Submit"&amp;gt;
&amp;lt;/form&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Validation&lt;/strong&gt; :
You can define a pattern for form inputs using the &lt;strong&gt;pattern&lt;/strong&gt; attribute, which ensures that the user input matches a specific format (using regular expressions).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
  &amp;lt;input type="text" name="pincode" pattern="\d{6}" title="Enter a 6-digit pin code"&amp;gt;
  &amp;lt;input type="submit" value="Submit"&amp;gt;
&amp;lt;/form&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input Types for Validation&lt;/strong&gt; :
HTML5 introduces new input types like email, url, date, number, and tel, which provide built-in validation for specific data formats.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
  &amp;lt;input type="email" name="email" required&amp;gt;
  &amp;lt;input type="submit" value="Submit"&amp;gt;
&amp;lt;/form&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTML is the backbone of web development. It structures the content on the web using tags, elements, and attributes, forming the foundation for building web pages. As you advance, you will combine HTML with CSS (for styling) and JavaScript (for interactivity) to create fully functioning websites.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>beginners</category>
      <category>learning</category>
      <category>devto</category>
    </item>
    <item>
      <title>HTML Formatting</title>
      <dc:creator>Bhabani Sankar</dc:creator>
      <pubDate>Wed, 18 Dec 2024 17:44:11 +0000</pubDate>
      <link>https://dev.to/bhabani_sankar/html-formatting-28jf</link>
      <guid>https://dev.to/bhabani_sankar/html-formatting-28jf</guid>
      <description>&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt; is a markup language,meaning it uses tags and attributes to define the structure and content of a webpage.It was developed by Tim Berners-Lee in the early 1990s and has since evolved into an essential technology for web development. HTML works alongside CSS (Cascading Style Sheets) and JavaScript, which add style and functionality to websites, respectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Basic Structure of an HTML Document&lt;/strong&gt; :&lt;br&gt;
An HTML document follows a standard structure that all webpages share. Here’s a simple example of an HTML document:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&amp;lt;html lang="en"&amp;gt;&lt;br&gt;
&amp;lt;head&amp;gt;&lt;br&gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;&lt;br&gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;&lt;br&gt;
    &amp;lt;title&amp;gt;My First Web Page&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
    &amp;lt;h1&amp;gt;Hello, World!&amp;lt;/h1&amp;gt;&lt;br&gt;
    &amp;lt;p&amp;gt;Welcome to my first webpage.&amp;lt;/p&amp;gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key HTML Tags and Their Functions&lt;/strong&gt;:&lt;br&gt;
HTML uses tags to structure content.Tags are enclosed in angle brackets &lt;br&gt;
 (&lt;code&gt;&amp;lt; &amp;gt;&lt;/code&gt;).Most tags come in pairs,with an opening tag(e.g.,&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;) and a closing tag (e.g.,&lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;). Here are some of the most commonly used HTML tags:&lt;/p&gt;

&lt;p&gt;a. &lt;strong&gt;Headings&lt;/strong&gt; (&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;to&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt;): Headings define the importance and hierarchy of text. &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; is the most important heading, and &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; is the least important.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Main Heading&amp;lt;/h1&amp;gt;&lt;br&gt;
&amp;lt;h2&amp;gt;Subheading&amp;lt;/h2&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;b. &lt;strong&gt;Paragraph&lt;/strong&gt; (&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;): A paragraph tag is used to define blocks of text.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph of text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;c. &lt;strong&gt;Links&lt;/strong&gt; (&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;): The anchor tag is used to create hyperlinks, allowing users to navigate to other pages or websites.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="https://www.google.com/"&amp;gt;Click here to visit Google.com&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;d. &lt;strong&gt;Images&lt;/strong&gt; (&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;): The image tag embeds images into the webpage.It requires a src attribute that specifies the image file location.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;img src="image.jpg" alt="Description of the image"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;e. &lt;strong&gt;Bold text&lt;/strong&gt; (&lt;code&gt;&amp;lt;b&amp;gt;&lt;/code&gt;): b tag is used to represent bold text with respect to its surrounding text.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;b&amp;gt;This text is bold.&amp;lt;/b&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;f. &lt;strong&gt;Bold text&lt;/strong&gt; (&lt;code&gt;&amp;lt;strong&amp;gt;&lt;/code&gt;):The HTML &lt;code&gt;&amp;lt;strong&amp;gt;&lt;/code&gt; element defines text with strong importance. The content inside is typically displayed in bold.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;strong&amp;gt;This text is important!&amp;lt;/strong&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;g. &lt;strong&gt;italic&lt;/strong&gt; (&lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;em&amp;gt;&lt;/code&gt;):The i tag is use to make the text italic,and em tag is also use to make the text italic but search engine understand it better.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;i&amp;gt;This text is italic&amp;lt;/i&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;em&amp;gt;This text is emphasized&amp;lt;/em&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;h. &lt;code&gt;&amp;lt;del&amp;gt;&lt;/code&gt; - &lt;strong&gt;Deleted Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;del&amp;gt;&lt;/code&gt; tag represents text that has been deleted from a document. It is typically rendered with a strikethrough (line through the text) to visually indicate the removal of the text.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is &amp;lt;del&amp;gt;old&amp;lt;/del&amp;gt; new text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;i. &lt;code&gt;&amp;lt;ins&amp;gt;&lt;/code&gt; - &lt;strong&gt;Inserted Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;ins&amp;gt;&lt;/code&gt; tag is used to represent text that has been inserted into a document. This text is often displayed with an underline to indicate it is newly added.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is &amp;lt;ins&amp;gt;new&amp;lt;/ins&amp;gt; text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;j. &lt;code&gt;&amp;lt;u&amp;gt;&lt;/code&gt; - &lt;strong&gt;Underlined Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;u&amp;gt;&lt;/code&gt; tag is used to underline text. However, it is generally used for styling purposes and should be avoided for semantic meaning, as modern CSS can handle underlining more effectively.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is &amp;lt;u&amp;gt;underlined&amp;lt;/u&amp;gt; text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;k. &lt;code&gt;&amp;lt;sup&amp;gt;&lt;/code&gt; - &lt;strong&gt;Superscript Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;sup&amp;gt;&lt;/code&gt; tag is used to display text in superscript, making it appear slightly above the normal line of text. This is commonly used for mathematical exponents or footnotes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;(a+b)&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;l. &lt;code&gt;&amp;lt;sub&amp;gt;&lt;/code&gt; - &lt;strong&gt;Subscript Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;sub&amp;gt;&lt;/code&gt; tag is used to display text in subscript, making it appear slightly below the normal line of text. This is often used for chemical formulas or other scientific notations.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;The chemical formula for water is H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;m. &lt;code&gt;&amp;lt;mark&amp;gt;&lt;/code&gt;- &lt;strong&gt;Marked or Highlighted Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;mark&amp;gt;&lt;/code&gt; tag is used to highlight text, typically for emphasis. This tag is often used when indicating a search result or highlighting important text. It is usually rendered with a yellow background.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a &amp;lt;mark&amp;gt;highlighted&amp;lt;/mark&amp;gt; text.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;n. &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; - &lt;strong&gt;Line Break&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tag is used to create a line break within a block of text. It does not require a closing tag. This tag is commonly used for poetry, addresses, or other content where line breaks are needed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is the first line.&amp;lt;br&amp;gt;This is the second line.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;o. &lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; - &lt;strong&gt;Horizontal Rule&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; tag is used to create a horizontal line (or rule) across the page. It is often used to separate sections of content and is typically displayed as a thick, horizontal line.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;HTML is the standard markup language for creating Web pages.&lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; &lt;/p&gt;


&lt;p&gt;CSS is a language that describes how HTML elements are to be displayed on screen, paper, or in other media.&lt;code&gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;p. &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt; - &lt;strong&gt;Keyboard Input&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;kbd&amp;gt;&lt;/code&gt; tag is used to represent user input that would typically come from a keyboard. The text within this tag is often displayed in a monospaced font, making it easy to distinguish keyboard inputs from other content.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;Press &amp;lt;kbd&amp;gt;Ctrl&amp;lt;/kbd&amp;gt; + &amp;lt;kbd&amp;gt;C&amp;lt;/kbd&amp;gt; to copy.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;q.&lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; - &lt;strong&gt;Preformatted Text&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;pre&amp;gt;&lt;/code&gt; tag is used to display preformatted text, preserving both whitespace and line breaks exactly as written in the HTML code. This is useful for displaying code snippets, poems, or text that requires precise formatting.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;pre&amp;gt;&lt;br&gt;
        This    is      preformatted&lt;br&gt;
        text.&lt;br&gt;
        It preserves spaces and&lt;br&gt;
        line breaks exactly.&lt;br&gt;
    &amp;lt;/pre&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;r. &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; - &lt;strong&gt;Inline Code&lt;/strong&gt;:&lt;br&gt;
The &lt;code&gt;&amp;lt;code&amp;gt;&lt;/code&gt; tag is used to display a piece of inline code, often within a paragraph or other text content. It typically uses a monospaced font to distinguish it from regular text.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;The &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; function is used to display output in Python.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;s. &lt;strong&gt;HTML Comments&lt;/strong&gt;:&lt;br&gt;
You can add comments to your HTML code, which are ignored by browsers but useful for explaining the code to yourself or others. Comments are written between &amp;lt;!-- and --&amp;gt; tags:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;!-- This is a comment --&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furzfe5lbc3e5xzaovz6b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furzfe5lbc3e5xzaovz6b.jpg" alt="Image description" width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These tags help structure content in meaningful ways, enhancing readability and providing context for the user. Understanding how and when to use them can improve your web pages' accessibility and user experience.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
