This tag is a root element. The tag shows up at the beginning and end of HTML Document. It Indicates that the webpage is written in HTML 5. and all other page markup comes in between these beginning and ending tags.


This Tag is Contains information that specific page, including the script file, style file and including the title tag and meta data and links also.


This tag is used for to show the title of our website for that pages and search engines.


Body will be contains the all content that will be show to user. including everything they'll see & read.

For Example :

        <title>Title Here</title>
      Body Content

Information :


The Base URL ( for example: is useful for specifying all relative links in a document (espacially if you have many internal links).


Meta data spells out additional information about the page, including the page's description, author, published date, keywrods and other typically 'hidden' pages information.


Can be used to a create relationships with external pages or documents, including style sheets.


This element includes documents style information, typically defaulting to CSS.


This element includes all scripting information, or this to external scripts. You can also include this element in the body to dynamically generate content.

Complete Example of HTML Structure

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <base href="" target="_blank"/>
    <title>My first Website</title>
    <link rel="stylesheet" href="style.css">
     let myVar = 19;
    Body Content
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

All six levels of Headings, with 1 begin the most important on a page and 6 begin the leat. These element are used to describe content sections on a page.


A generic container used to denote a page section.


An inline section or block container, typically used for grouping stying elements.


This foundational tag is used to organize paragraphs of text.


Creates a line break to use this tag.


Creates a horizontal rule , a sectional break in an HTML page. Typically used to denote a charge in topic or section of a page.

Text Formatting


Exactly like it sounds, indicating STRONG emphasis, displayed bold in most browsers.


Another way to create bold text, however it's more for drawing attention as opposed to emphasizing extra emphasis like the previoust tag.


The emphasis tags also are like they sound, emphasizing text or phrases, displayed as italics in most browsers.


Another way to add italics to text, however without the added emphasis and instead used to denote things like thought or names.


An older tag used to display fixed-width, typewriter-esque text. No longer supported in HTML 5.


This tag creates through text (or test with a line through it). Another Older tag not commonly supported.


Tags used to cite or reference information, useful for quotes and statements in a document.


Pre-formatted, 'monospace' text laid out with whitespace inside the element intact.


Helps denote a previously deleted section of text.


Represents a section of text that's been inserted into the document.


Reserved for long paragraphs of quotations, often cited.


These are used for shorter quotations.


Abbreviation These help denote abbreviations, while also making the full form available.


Acronym text Similar to the previous abbreviation tag, but this time with acronyms. Not Support in HTML 5


A helpfully obvious tag that displays the author's contact inforamation.


Defination Used to create an inline definitation in the body text.


Code text Displays code snippets (like the one over to the left), typically showing up monospaced.


Font tag Old-school way to colour fonts. No longer part of HTML 5.


Subsript text Similiar to the previous subscript, however this time placing it a half line higher than the previous text.


Superscript text Simiar to the previous subscript, however this time placing it a haf line higher than the previous text.


Small site text Historically used to simply reduce text size, in HTML 5, it also refers to information that may no longer be valid, accurate or relevant.


The bi-directional override tag will identify which should text should be read opposite from the preceeding text.

Links Formatting

<a href="">...</a>

Anchor text for hyperlink.

<a href="mailto:">...</a>

A link used to pull up an outgoing message to a specific email address.

<a href="tel://###-###">...</a>

A link to make phone number, clickable, especially useful for mobile users.

<a name="name">...</a>

An anchor that's useful for bringing users to specific document elements.

<a href="#name">...</a>

An anchor link that brings user specifically to a div element.

Image Formatting :

<img src="image_url" width="" height="" alt="">

An image tag to include and display image files.

src="image_url" : Exactly like it sounds. The URL or File of the image to display.

alt="alternative_text" : Alternative text that helps explain the image content to both search engines and users.

width="" : The Ability to specify image height in pixels or percentages.

height="" : The ability to specify image widht in pixels or percentages.


Helps you tell users that this is an interactive image with clickable areas.


Specify the area of image map.

List Formatting :


Create numbered (ordered) lists showing sequential order, preference or priority.


Display a bulleted (unordered) list without any extra emphasis or order of importance.


Specifies each list item to be bulleted or numbered.


Reserved specifically for list items definations.


The definition of a single term inline with body content.


The description for the defined term.

For Example :

<!-- Unorderd List -->

<!-- Ordered List -->

    <dd>Black and Cold Coffee</dd>
    <dd>White and Cold drinks</dd>

Forms Formatting : 


The form element creates a form, spelling out how the form will operate based on it's attributes.

action="url" : The form action URL specifies where data is to be sent when a site visitor submits the form.

method="" : The method attribute refers to the HTTP method (GET, POST) , which dicates how to send the form data.

enctype="" : This attribute dicates how the form-data is to be endonded when submitting information back to the web sever (for method="POST" only).

actocomplete : Dictates wherther a form should have autocomplete on or off.

novalidate : Dictates whether the form should not be validated when submitted.

accept-charsets : Identifies the character encodings upon the form submission.

target : Tells where to display the form response after being submitted, gererally one of the following _blank, _self, _parent, _top.


Identifies the group of all fields on the form.


The form legend acts as a caption for the fieldset element.


The form input attributes defines the type of field information to receive from a user.

Input type attributes

type="" : Specifies the field input. typically including text, password, date-time, checkbox, submit etc.

name="" : Describes the name of the form.

value="" : Describes the value or input field information.

size="" : Specifies the input element width in characters.

maxlength="" : Identifies the maximum input element character number allowed.

required : Another helpfully explicit tag, making sure the <input> element is completely filled our prior to the user submitting the form.

step="" : Idetifies the legal number intervals for an input field.

width="" : Specifies the width (in pixels) of an <input> element.

height="" : Specifies the height of an <input> element.

placeholder="" : Provides a helpful hind to the user, describing what the <input> element value should be.

pattern="" : Identifies a regular expression that the <input> element gets checked against, making sure the user entered the correct information.

min="" : The minimum value allowed for each <input> element.

max="" : The maximum value allowed for each <input> element.

autofocus : Says to make sure that the <input> element comes into focus after the page loads.

disabled : Disables an <input> element on the form.


Specifies a large text input form longer messages.


Describes a drop-down box for user's to select one from a variety of options.

Select Attributes

name="" : The name for a drop down combination box.

size="" : Specifies the number of available, visible options in a drop-down.

mutliple : Allows for multiple selections to be made at one time.

required : Required that a value is selcted before a user can submit a form.

autofocus : Specifies that a drop-down list automatically comes into focus after a page loads.


Specifies the entire grouping available options.


Defines one of the available options in the drop-down list.

Option Attributes.

values="" : Explains the option value availabel for selction.

selected="" : Defines the default selected option for users.


Defines the clickable button for users to submit options.

For Example :

 <form action="action.php" method="POST">
            First Name : <br>
            <input type="text" name="firstname" placeholder="First Name">
            Last Name : <br>
            <input type="text" name="secondname" placeholder="Last Name">
            Favorite car brand <br>
            <select name="car">
                <option value="volvo">volvo</option>
                <option value="BMW">BMW</option>
                <option value="Audi">Audi</option>
                <option value="Tesla">Tesla</option>
            <textarea name="description"  cols="30" rows="10"></textarea>
            <input type="submit" value="submit">

Tables Formatting :


The table tag identifies and contains all table related content.


The caption is a description of what the table is, and what it contains.


The table headers describe the type of information contained in each column underneath.


The table body contains the table's data or information.


Table fotters describe all footer content.


Contains the information to be included in a single row of the table.


Contains the actual information or data in a single header item.


Contains the actual information or data in a single table cell.


Groups a single (or multiple) columns for formattin purposes.


Defines a single column of information inside a table.

For Example :

            <col span="2" style="background-color: #a1a5a7;">
            <col style="background-color: #becde7;">

Objects and iFrames


The object tag describes an embedded file type, including , audio, video, PDFs, additional pages, and more.

height="" : Describes the height of the object in pixels.

width="" : Describes the width of the object in pixels.

type="" : Describes which media type the data contains.

usemap="" : This is the name of a client side image map within <object>.


Contains an inline iframe that allows you to embed external information into an existing document.

name="" : The name of the <iframe>

src="" : The URL source of the original document to embed inside the <iframe>

srcdoc="" : The contains the acutal HTML content to display inside the <iframe> on the current page.

width="" : Defines the widht of your <iframe>


Appending extra parameters help you customize the iframe content.


The embed tag acts as a container for another external application or additional plug-in.

Embed Attributes

height="" : Defines the height of the embeded content you're including.

widht="" : Similar to previous, but this time defining the width of the embedded content.

src="" : The source URL of the external file you're embedding.

type="" : Describe the media type of embedded content to include.

For Example : 

    <object width="400px" height="400px"></object>
    <iframe src="" width="600px" height="400px" frameborder="0"></iframe>
    <embed src="" >



Defined the header block for a document (or individual section).


Identifies the footer block for the document (or an individual section).


Describes the main content of a document.


Idenfies an article inside a document.


Specifies a section block in the document.


Describes additional facts or information that the user can view or hide.


A dialog box or window.


The <figure> element caption that helps describes the figure.


An independent content block featuring diagrams, photos, illustations or more.


Displays a portion of highlighted text within the page content.


Navigation links for th euser in a document.


The specific menu item that a user can raise fro a popupmenu.


Describes the scalar measurement within a known array.


Displays the progress of a task, usually used for progress bar.


Displays text within browsers that do not support ruby annotations.


Displays East Asian typography character details.


Describes a Ruby annotation for East Asian typography.


Contains a visible heading for a <details> element.


Helps you format part or text in different direction from other text.


Identifies the time and date.


A line-break withing the content.


Login is mandatory to comment Please login

Recommended Posts

C Programming Language Cheatsheet

Basic Syntax and function used in c programming language.