Bootstrap Jumbotorn

A jumbotron in Bootstrap is a large, flexible container that can be used to showcase important content or messages on your website. It is typically used to draw attention to a specific piece of content and is often placed at the top of a page.

To create a jumbotron in Bootstrap, you can use the .jumbotron class on an <div> element. You can also use the .jumbotron-fluid class to create a full-width jumbotron that spans the entire width of the viewport.

Here is an example of how to create a jumbotron in Bootstrap:

<div class="jumbotron">
  <h1 class="display-4">Hello, world!</h1>
  <p class="lead">This is a simple jumbotron example.</p>
  <hr class="my-4">
  <p>Learn more about Bootstrap on the official website.</p>
  <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
</div>

This example creates a jumbotron with a large heading, a lead paragraph, and a button.

You can customize the appearance and layout of your jumbotron using Bootstrap’s various layout and styling utilities. For example, you can use the .text-* classes to set the text color, the

The HTML DOCTYPE

The DOCTYPE in HTML is an instruction that tells the web browser which version of HTML the document is written in. It is the first line of an HTML document, and is usually placed at the very top of the file, before the <html> element.

The DOCTYPE is not an HTML element, and does not have a closing tag. It is used to tell the web browser which version of HTML to use when rendering the document.

There are several different versions of HTML, each with its own DOCTYPE declaration. The most common DOCTYPE declarations are:

  • <!DOCTYPE html>: This DOCTYPE is used for HTML5 documents.
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">: This DOCTYPE is used for HTML 4.01 Strict documents.
  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">: This DOCTYPE is used for HTML 4.01 Transitional documents.

Here is an example of an HTML document with a DOCTYPE declaration:

<!DOCTYPE html>
<html>
  <head>
    <title>My Page</title>
  </head>
  <body>
    <h1>Welcome to My Page</h1>
    <p>Here is some information about me:</p>
    <ul>
      <li>Name: John</li>
      <li>Age: 30</li>
      <li>Location: New York</li>
    </ul>
  </body>
</html>

In this example, the DOCTYPE declaration is <!DOCTYPE html>, which tells the web browser that the document is written in HTML5.

It’s important to include a DOCTYPE declaration in your HTML documents, as this will help the web browser correctly interpret and render the document.

That’s it! You now know what the HTML DOCTYPE is and how to use it in your HTML documents.

HTML head Tag

    The <head> tag in HTML is used to define the head section of an HTML document. The head section contains metadata about the document, such as the title, CSS styles, and scripts.

    The <head> the element should be placed at the beginning of the HTML document, before the <body> element. It should contain a variety of other HTML elements, such as the <title> element, <style> element, and <script> element.

    Here is an example of an HTML document with a <head> element:

    <!DOCTYPE html>
    <html>
      <head>
        <title>My Page</title>
        <style>
          body {
            font-family: Arial;
          }
        </style>
        <script src="myscript.js"></script>
      </head>
      <body>
        <h1>Welcome to My Page</h1>
        <p>Here is some information about me:</p>
        <ul>
          <li>Name: John</li>
          <li>Age: 30</li>
          <li>Location: New York</li>
        </ul>
      </body>
    </html>
    

    In this example, the <head> element contains the <title> element, <style> element, and <script> element. The <title> the element defines the title of the HTML document, the <style> the element defines a CSS style for the document and the <script> the element includes a JavaScript file in the document.

    It’s important to include all necessary metadata in the <head> element of your HTML documents, as this will help users and search engines understand the content and purpose of the page.

    That’s it! You now know how to use the HTML <head> tag to define the head section of an HTML document.

    HTML title Tag

    The <title> tag in HTML is used to define the title of an HTML document. The title appears in the browser tab or window and is also used by search engines to identify the content of the page.

    The <title> the tag should be placed in the <head> element of the HTML document, and should only contain text (no other HTML elements). Here is an example of an HTML document with an <title> element:

    <!DOCTYPE html>
    <html>
      <head>
        <title>My Page</title>
      </head>
      <body>
        <h1>Welcome to My Page</h1>
        <p>Here is some information about me:</p>
        <ul>
          <li>Name: John</li>
          <li>Age: 30</li>
          <li>Location: New York</li>
        </ul>
      </body>
    </html>
    

    In this example, the title of the HTML document is “My Page”. This title will appear in the browser tab or window and will be used by search engines to identify the content of the page.

    It’s important to choose a descriptive and relevant title for your HTML documents, as this will help users and search engines understand the content of the page. The title should be concise and to the point, and should accurately reflect the content of the page.

    That’s it! You now know how to use the HTML <title> tag to define the title of an HTML document.

    HTML Body Tag

    The <body> tag in HTML represents the main content of an HTML document. It is a container for all the other HTML elements that make up the content of the page, such as headings, paragraphs, images, and links.

    Here is an example of an HTML document with a <body> element:

    Copy code<!DOCTYPE html>
    <html>
      <head>
        <title>My Page</title>
      </head>
      <body>
        <h1>Welcome to My Page</h1>
        <p>Here is some information about me:</p>
        <ul>
          <li>Name: John</li>
          <li>Age: 30</li>
          <li>Location: New York</li>
        </ul>
        <img src="my-picture.jpg" alt="A picture of me">
      </body>
    </html>
    

    In this example, the <h1>, <p>, <ul>, and <img> elements are all contained within the <body> element.

    HTML h1-h6 Tag

    The HTML <h1> through <h6> Tags are used to define headings in an HTML document. The <h1> tag is the highest-level heading and the <h6> tag is the lowest-level heading.

    Headings are used to giving structure to an HTML document and make it easier for users to navigate and understand the content. They also help search engines understand the hierarchy and importance of the content on a page.

    Here is an example of how to use the <h1> through <h6> Tags:

    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6</h6>
    

    The text within a heading tag is usually displayed in a larger and bolder font than the surrounding text. The exact appearance of the headings will depend on the style sheet that is applied to the HTML document.

    It’s important to use headings appropriately and in a logical order. The <h1> the tag should be used for the main heading on a page, and the <h2> through <h6> tags should be used for subheadings in descending order of importance.

    I hope this helps! Let me know if you have any additional questions about the HTML <h1> through <h6> tags.

    HTML Tags

    <!–…–>Defines a comment
    <!DOCTYPE> Defines the document type
    <a>Defines a hyperlink
    <abbr>Defines an abbreviation or an acronym
    <acronym>Not supported in HTML5. Use <abbr> instead.
    Defines an acronym
    <address>Defines contact information for the author/owner of a document
    <applet>Not supported in HTML5. Use <embed> or <object> instead.
    Defines an embedded applet
    <area>Defines an area inside an image map
    <article>Defines an article
    <aside>Defines content aside from the page content
    <audio>Defines embedded sound content
    <b>Defines bold text
    <base>Specifies the base URL/target for all relative URLs in a document
    <basefont>Not supported in HTML5. Use CSS instead.
    Specifies a default color, size, and font for all text in a document
    <bdi>Isolates a part of text that might be formatted in a different direction from other text outside it
    <bdo>Overrides the current text direction
    <big>Not supported in HTML5. Use CSS instead.
    Defines big text
    <blockquote>Defines a section that is quoted from another source
    <body>Defines the document’s body
    <br>Defines a single line break
    <button>Defines a clickable button
    <canvas>Used to draw graphics, on the fly, via scripting (usually JavaScript)
    <caption>Defines a table caption
    <center>Not supported in HTML5. Use CSS instead.
    Defines centered text
    <cite>Defines the title of a work
    <code>Defines a piece of computer code
    <col>Specifies column properties for each column within a <colgroup> element 
    <colgroup>Specifies a group of one or more columns in a table for formatting
    <data>Adds a machine-readable translation of a given content
    <datalist>Specifies a list of pre-defined options for input controls
    <dd>Defines a description/value of a term in a description list
    <del>Defines text that has been deleted from a document
    <details>Defines additional details that the user can view or hide
    <dfn>Specifies a term that is going to be defined within the content
    <dialog>Defines a dialog box or window
    <dir>Not supported in HTML5. Use <ul> instead.
    Defines a directory list
    <div>Defines a section in a document
    <dl>Defines a description list
    <dt>Defines a term/name in a description list
    <em>Defines emphasized text 
    <embed>Defines a container for an external application
    <fieldset>Groups related elements in a form
    <figcaption>Defines a caption for a <figure> element
    <figure>Specifies self-contained content
    <font>Not supported in HTML5. Use CSS instead.
    Defines font, color, and size for text
    <footer>Defines a footer for a document or section
    <form>Defines an HTML form for user input
    <frame>Not supported in HTML5.
    Defines a window (a frame) in a frameset
    <frameset>Not supported in HTML5.
    Defines a set of frames
    <h1> to <h6>Defines HTML headings
    <head>Contains metadata/information for the document
    <header>Defines a header for a document or section
    <hr>Defines a thematic change in the content
    <html>Defines the root of an HTML document
    <i>Defines a part of text in an alternate voice or mood
    <iframe>Defines an inline frame
    <img>Defines an image
    <input>Defines an input control
    <ins>Defines a text that has been inserted into a document
    <kbd>Defines keyboard input
    <label>Defines a label for an <input> element
    <legend>Defines a caption for a <fieldset> element
    <li>Defines a list item
    <link>Defines the relationship between a document and an external resource (most used to link to style sheets)
    <main>Specifies the main content of a document
    <map>Defines an image map
    <mark>Defines marked/highlighted text
    <meta>Defines metadata about an HTML document
    <meter>Defines a scalar measurement within a known range (a gauge)
    <nav>Defines navigation links
    <noframes>Not supported in HTML5.
    Defines an alternate content for users that do not support frames
    <noscript>Defines an alternate content for users that do not support client-side scripts
    <object>Defines a container for an external application
    <ol>Defines an ordered list
    <optgroup>Defines a group of related options in a drop-down list
    <option>Defines an option in a drop-down list
    <output>Defines the result of a calculation
    <p>Defines a paragraph
    <param>Defines a parameter for an object
    <picture>Defines a container for multiple image resources
    <pre>Defines preformatted text
    <progress>Represents the progress of a task
    <q>Defines a short quotation
    <rp>Defines what to show in browsers that do not support ruby annotations
    <rt>Defines an explanation/pronunciation of characters (for East Asian typography)
    <ruby>Defines a ruby annotation (for East Asian typography)
    <s>Defines text that is no longer correct
    <samp>Defines sample output from a computer program
    <script>Defines a client-side script
    <section>Defines a section in a document
    <select>Defines a drop-down list
    <small>Defines smaller text
    <source>Defines multiple media resources for media elements (<video> and <audio>)
    <span>Defines a section in a document
    <strike>Not supported in HTML5. Use <del> or <s> instead.
    Defines strikethrough text
    <strong>Defines important text
    <style>Defines style information for a document
    <sub>Defines subscripted text
    <summary>Defines a visible heading for a <details> element
    <sup>Defines superscripted text
    <svg>Defines a container for SVG graphics
    <table>Defines a table
    <tbody>Groups the body content in a table
    <td>Defines a cell in a table
    <template>Defines a container for content that should be hidden when the page loads
    <textarea>Defines a multiline input control (text area)
    <tfoot>Groups the footer content in a table
    <th>Defines a header cell in a table
    <thead>Groups the header content in a table
    <time>Defines a specific time (or datetime)
    <title>Defines a title for the document
    <tr>Defines a row in a table
    <track>Defines text tracks for media elements (<video> and <audio>)
    <tt>Not supported in HTML5. Use CSS instead.
    Defines teletype text
    <u>Defines some text that is unarticulated and styled differently from normal text
    <ul>Defines an unordered list
    <var>Defines a variable
    <video>Defines embedded video content
    <wbr>Defines a possible line-break

    Basic HTML:

    <!DOCTYPE>,<html>,<head>,<title>,<body>,<h1>..<h6>,<p>,<br>,<hr>,<!–…–>

    Formatting Tags:

    <acronym>,<abbr>,<address>,<b>,<bdi>,<bdo>,<big>,<blockquote><center>,<side>,<code>,<del>,<dfn>,<em>,<font>,<i>,<ins>,<kbd>,<mark>,<meter>,<pre>,<progess>,<q>,<rp>,<rt>,<ruby>,<s>,<samp>,<small>,<strike>,<strong>,<sub>,<sup>,<template>,<time>,<tt>,<u>,<var>,<wbr>

    Forms and Inputs:

    <form>,<input>,<textarea>,<button>,<select>,<optgroup>,<option>,<llabel>,<fieldset>,<legend>,<datalist>,<output>

    Frames:

    <frame>,<frameset>,<notframes>,<iframe>

    Images:

    <img>,<map>,<area>,<canvas>,<figcaption>,<figure>,<picture>,<svg>

    Audo/Video:

    <audio>,<source>,<track>,<video>

    Links:

    <a>,<link>,<nav>

    Lists:

    <ul>,<ol>,<li>,<dir>,<dl>,<dt>,<dd>

    Tables:

    <table>,<caption>,<th>,<tr>,<td>,<thead>,<tbody>,<tfoot>,<col>,<colgroup>

    Style and Semantics:

    <style>,<div>,<span>,<header>,<footer>,<main>,<section>,<article>,<details>,<dialog>,<summary>,<data>

    Meta Info:

    <head>,<meta>,<base>,<basefont>

    Programming:

    <script>,<nonscript>,<applet>,<embed>,<object>,<param>

    Django Architecture

    There are 3 main elements or code compartments for most websites on the internet Input LogicBusiness Logic, and UI Logic.

    These partitions of code have specific tasks to achieve, the input logic is the dataset and how the data gets organized in the database. It just takes that input and sends it to the database in the desired format. The Business logic is the main controller which handles the output from the server in the HTML or desired format. The UI Logic as the name suggests is the HTML, CSS, and JavaScript pages.

    When the traditional approach was used for programming all this code was written in a single file, i.e., every piece of code increases the webpage size, which is downloaded and rendered by the browser. This was not a big problem back in the time, the webpages were largely static, and websites didn’t contain much multimedia and large coding. Also, this architecture poses difficulty for developers while testing and maintaining the project as everything is inside one file.

    Now, time is changing and the websites are getting bigger and bigger while providing applications and online artificial intelligence training, online development environments, and whatnot, these projects are all implemented using MVC architecture.

    MVC Architecture:

    MVC is abbreviated as Model View Controller is a design pattern created for developing applications specifically web applications. As the name suggests, it has three major parts. The traditional software design pattern works in an “Input – Process – Output” pattern whereas MVC works as a “Controller -Model – View” approach.

    1. Model: The Model encloses the clean application-related data. But the model does not deal with any logic about how to present the data.
    2. View: The View element is used for presenting the data of the model to the user. This element deals with how to link up with the model’s data but doesn’t provide any logic regarding what this data is all about or how users can use these data.
    3. Controller: The Controller is in between the model and the view element. It listens to all the incidents and actions triggered in the view and performs an appropriate response back to the events.

    MVT Architecture:

    • Model: This is an abstraction layer for structuring and manipulating the data of the Web Application. It acts as an interface for maintaining data. This is a logical data structure behind the entire application and helps to handle the database.
    • View: This layer encapsulates the logic responsible for processing a user’s request and returns a response. It is a user interface to execute the logic and interact with the models. It is responsible for displaying all or a portion of data to the user.
    • Template: The template layer provides a designer-friendly syntax for rendering the information to be presented to the user. It contains the static parts of the desired HTML output along with some special syntax, also known as Django Template Language (DTL), describing how dynamic content will be inserted.

    Here, a user requests a resource to the Django, Django works as a controller and checks the available resource in the URL.

    If URL maps, a view is called that interacts with the model and template, it renders a template.

    Django responds back to the user and sends a template as a response.

    CSS Image Sprites

    It is basically an image which is a collection of different images put together to form a single image. The use of image sprites is done for two main reasons:

    • For faster page loading since use only single image.
    • It reduce the bandwidth used to load multiple images. This way less data is consume.

    Image sprites are generally used for designing a graphic social media bar or a navigation bar to make it more attractive and efficient at the same time. It is just a method in HTML and CSS to implement more efficient way of putting images and designing web pages.

    Example:

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    #navlist {
      position: relative;
    }
    
    #navlist li {
      margin: 0;
      padding: 0;
      list-style: none;
      position: absolute;
      top: 0;
    }
    
    #navlist li, #navlist a {
      height: 44px;
      display: block;
    }
    
    #home {
      left: 0px;
      width: 46px;
      background: url('img_navsprites_hover.gif') 0 0;
    }
    
    #prev {
      left: 63px;
      width: 43px;
      background: url('img_navsprites_hover.gif') -47px 0;
    }
    
    #next {
      left: 129px;
      width: 43px;
      background: url('img_navsprites_hover.gif') -91px 0;
    }
    
    #home a:hover {
      background: url('img_navsprites_hover.gif') 0 -45px;
    }
    
    #prev a:hover {
      background: url('img_navsprites_hover.gif') -47px -45px;
    }
    
    #next a:hover {
      background: url('img_navsprites_hover.gif') -91px -45px;
    }
    </style>
    </head>
    <body>
    
    <ul id="navlist">
      <li id="home"><a href="default.asp"></a></li>
      <li id="prev"><a href="css_intro.asp"></a></li>
      <li id="next"><a href="css_syntax.asp"></a></li>
    </ul>
    
    </body>
    </html>
    

    Output:

    CSS Image Opacity

    Opacity describes how opaque an object is. While it is not specific to computer terminology, the term is often used in computer graphics software. For example, many programs include an “Opacity” setting that allows you to adjust the transparency of an image.

    Example:

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Image Gallery</title>
        <style>
            div.gallery {
                margin: 5px;
                border: 2px solid #ccc;
                float: left;
                width: 180px;
            }
    
            div.gallery:hover {
                border: 1px solid #777;
    
            }
    
            div.gallery img {
                width: 100%;
                height: auto;
                opacity: 0.2;
            }
    
            div.desc {
                padding: 15px;
                text-align: center;
            }
        </style>
    </head>
    </head>
    
    <body>
        <div class="gallery">
            <a target="_blank" href="sky.jpeg">
                <img src="sky.jpeg" alt="sky" width="600" height="400">
            </a>
            <div class="desc">This is a image of sky</div>
        </div>
    
        <div class="gallery">
            <a target="_blank" href="mountain.jpg">
                <img src="mountain.jpg" alt="mountain" width="600" height="400">
            </a>
            <div class="desc">This is a image of Mountain</div>
        </div>
    
        <div class="gallery">
            <a target="_blank" href="river.jpg">
                <img src="river.jpg" alt="river" width="600" height="400">
            </a>
            <div class="desc">This is a image of river</div>
        </div>
    
        <div class="gallery">
            <a target="_blank" href="forest.jpeg">
                <img src="forest.jpeg" alt="forest" width="600" height="400">
            </a>
            <div class="desc">This is image of forest</div>
        </div>
    
    </body>
    
    </html>

    Output: