CoderFunda
  • Home
  • About us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • About us
  • Home
  • Php
  • HTML
  • CSS
  • JavaScript
    • JavaScript
    • Jquery
    • JqueryUI
    • Stock
  • SQL
  • Vue.Js
  • Python
  • Wordpress
  • C++
    • C++
    • C
  • Laravel
    • Laravel
      • Overview
      • Namespaces
      • Middleware
      • Routing
      • Configuration
      • Application Structure
      • Installation
    • Overview
  • DBMS
    • DBMS
      • PL/SQL
      • SQLite
      • MongoDB
      • Cassandra
      • MySQL
      • Oracle
      • CouchDB
      • Neo4j
      • DB2
      • Quiz
    • Overview
  • Entertainment
    • TV Series Update
    • Movie Review
    • Movie Review
  • More
    • Vue. Js
    • Php Question
    • Php Interview Question
    • Laravel Interview Question
    • SQL Interview Question
    • IAS Interview Question
    • PCS Interview Question
    • Technology
    • Other

21 October, 2020

Message: Trying to access array offset on value of type null [duplicate]

 Programing Coderfunda     October 21, 2020     No comments   

Message: Trying to access array offset on value of type null [duplicate]

 

This question already has answers here:
Trying to access array offset on value of type null (2 answers)
Closed 10 months ago.

I'm getting this error on multiple occasion in a script (invoiceplane) I have been using for a few years now but which hasn't been maintained unfortunately by its creators:

Message: Trying to access array offset on value of type null

My server has been upgrade to PHP 7.4 and I'm looking for a way to fix the issues and maintain the script myself since I'm very happy with it.

This is what's on the line that gives the error:

$len = $cOTLdata['char_data'] === null ? 0 : count($cOTLdata['char_data']);

$cOTLdata is passed to the function:

public function trimOTLdata(&$cOTLdata, $Left = true, $Right = true)
{
    $len = $cOTLdata['char_data'] === null ? 0 : count($cOTLdata['char_data']);
    $nLeft = 0;
    $nRight = 0;
    //etc

It's included in mpdf btw, but simply overwriting the files from the github repository did not fix the errors.

 

 

1 Answer

39

This happens because $cOTLdata is not null but the index 'char_data' does not exist. Previous versions of PHP may have been less strict on such mistakes and silently swallowed the error / notice while 7.4 does not do this anymore.

To check whether the index exists or not you can use isset():

isset($cOTLdata['char_data'])

Which means the line should look something like this:

$len = isset($cOTLdata['char_data']) ? count($cOTLdata['char_data']) : 0;

Note I switched the then and else cases of the ternary operator since === null is essentially what isset already does (but in the positive case).

 

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

17 October, 2020

Clang not generating debug info on -g flag

 Programing Coderfunda     October 17, 2020     No comments   

 

1 Answer

Active     Oldest  Votes
5

On Windows, Clang is not self-sufficient (at least not the official binaries). You need to have either GCC or MSVC installed for it to function.

As Target: x86_64-pc-windows-msvc indicates, by default your Clang is operating in some kind of MSVC-compatible mode. From what I gathered, it means using the standard library and other libraries provided by your MSVC installation, and presumably generating debug info in some MSVC-specific format.

Add --target=x86_64-w64-windows-gnu to build in GCC-compatible mode. (If you're building for 32 bits rather than 64, replace x86_64 with i686). This will make Clang use headers & libraries provided by your GCC installation, and debug info should be generated in a GCC-compatible way. I'm able to debug resulting binaries with MSYS2's GDB (and that's also where my GCC installation comes from).

If you only have GCC installed and not MSVC, you still must use this flag.

How do I know this is the right --target? This is what MSYS2's Clang uses, and I assume they know what they're doing. If you don't want to type this flag every time, you can replace the official Clang with MSYS2's one, but I'm not sure if it's the best idea.
(I think they used to provide some patches to increase compatibility with MinGW, but now the official binaries work equally well, except for the need to specify the target. Also, last time I checked their binary distribution was several GB larger, due to their inability to get dynamic linking to work. Also some of the versions they provided were prone to crashing. All those problems come from them building their Clang with MinGW, which Clang doesn't seem to support very well out of the box. In their defence, they're actively maintaining their distribution, and I think they even ship libc++ for Windows, which the official distribution doesn't do.)

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Clang not generating debug info on -g flag

 Programing Coderfunda     October 17, 2020     No comments   

 

1 Answer

Active     Oldest  Votes
5

On Windows, Clang is not self-sufficient (at least not the official binaries). You need to have either GCC or MSVC installed for it to function.

As Target: x86_64-pc-windows-msvc indicates, by default your Clang is operating in some kind of MSVC-compatible mode. From what I gathered, it means using the standard library and other libraries provided by your MSVC installation, and presumably generating debug info in some MSVC-specific format.

Add --target=x86_64-w64-windows-gnu to build in GCC-compatible mode. (If you're building for 32 bits rather than 64, replace x86_64 with i686). This will make Clang use headers & libraries provided by your GCC installation, and debug info should be generated in a GCC-compatible way. I'm able to debug resulting binaries with MSYS2's GDB (and that's also where my GCC installation comes from).

If you only have GCC installed and not MSVC, you still must use this flag.

How do I know this is the right --target? This is what MSYS2's Clang uses, and I assume they know what they're doing. If you don't want to type this flag every time, you can replace the official Clang with MSYS2's one, but I'm not sure if it's the best idea.
(I think they used to provide some patches to increase compatibility with MinGW, but now the official binaries work equally well, except for the need to specify the target. Also, last time I checked their binary distribution was several GB larger, due to their inability to get dynamic linking to work. Also some of the versions they provided were prone to crashing. All those problems come from them building their Clang with MinGW, which Clang doesn't seem to support very well out of the box. In their defence, they're actively maintaining their distribution, and I think they even ship libc++ for Windows, which the official distribution doesn't do.)

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Elements

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Elements

An HTML file is made of elements. These elements are responsible for creating web pages and define content in that webpage. An element in HTML usually consist of a start tag <tag name>, close tag </tag name> and content inserted between them. Technically, an element is a collection of start tag, attributes, end tag, content between them.


Note: Some elements does not have end tag and content, these elements are termed as empty elements or self-closing element or void elements.

Such as:


<p> Hello world!!! </p>   

Example

<!DOCTYPE html>  

<html>  

<head>  

    <title>WebPage</title>  

</head>  

<body>  

   <h1>This is my first web page</h1>  

    <h2> How it looks?</h2>  

     <p>It looks Nice!!!!!</p>  

</body>  

</html>  



Void element: All the elements in HTML do not require to have start tag and end tag, some elements does not have content and end tag such elements are known as Void elements or empty elements. These elements are also called as unpaired tag.



Some Void elements are <br> (represents a line break) , <hr>(represents a horizontal line), etc.


Nested HTML Elements: HTML can be nested, which means an element can contain another element.


Block-level and Inline HTML elements

For the default display and styling purpose in HTML, all the elements are divided into two categories:


Block-level element

Inline element

Block-level element:

These are the elements, which structure main part of web page, by dividing a page into coherent blocks.

A block-level element always start with new line and takes the full width of web page, from left to right.

These elements can contain block-level as well as inline elements.

Following are the block-level elements in HTML.


<address>, <article>, <aside>, <blockquote>, <canvas>, <dd>, <div>, <dl>, <dt>, <fieldset>, <figcaption>, <figure>, <footer>, <form>, <h1>-<h6>, <header>, <hr>, <li>, <main>, <nav>, <noscript>, <ol>, <output>, <p>, <pre>, <section>, <table>, <tfoot>, <ul> and <video>.


Note: All these elements are described in later chapters.

Example:

<!DOCTYPE html>  

<html>  

             <head>  

    </head>  

<body>  

    <div style="background-color: lightblue">This is first div</div>  

    <div style="background-color: lightgreen">This is second div</div>  

    <p style="background-color: pink">This is a block level element</p>  

</body>  

</html>  

Test it Now

Output:


Block-level and Inline HTML elements

In the above example we have used


tag, which defines a section in a web page, and takes full width of page.

We have used style attribute which is used to styling the HTML content, and the background color are showing that it's a block level element.


Inline elements:

Inline elements are those elements, which differentiate the part of a given text and provide it a particular function.

These elements does not start with new line and take width as per requirement.

The Inline elements are mostly used with other elements.

<a>, <abbr>, <acronym>, <b>, <bdo>, <big>, <br>, <button>, <cite>, <code>, <dfn>, <em>, <i>, <img>, <input>, <kbd>, <label>, <map>, <object>, <q>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <textarea>, <time>, <tt>, <var>.


Example:

<!DOCTYPE html>  

<html>  

    <head>  

    </head>  

<body>  

    <a href="https://www.javatpoint.com/html-tutorial">Click on link</a>  

    <span style="background-color: lightblue">this is inline element</span>  

    <p>This will take width of text only</p>  

 </body>  

</html>   

Test it Now

Output:


Block-level and Inline HTML elements

Following is the list of the some main elements used in HTML:


Start tag Content End tag Description

<h1> ...... <h6> These are headings of HTML </h1>??..</h6> These elements are used to provide the headings of page.

<p> This is the paragraph </p> This element is used to display a content in form of paragraph.

<div> This is div section </div> This element is used to provide a section in web page.

<br> This element is used to provide a line break. ( void element)

<hr> This element is used to provide a horizontal line. (void element)

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Elements

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Elements

An HTML file is made of elements. These elements are responsible for creating web pages and define content in that webpage. An element in HTML usually consist of a start tag <tag name>, close tag </tag name> and content inserted between them. Technically, an element is a collection of start tag, attributes, end tag, content between them.


Note: Some elements does not have end tag and content, these elements are termed as empty elements or self-closing element or void elements.

Such as:


<p> Hello world!!! </p>   

Example

<!DOCTYPE html>  

<html>  

<head>  

    <title>WebPage</title>  

</head>  

<body>  

   <h1>This is my first web page</h1>  

    <h2> How it looks?</h2>  

     <p>It looks Nice!!!!!</p>  

</body>  

</html>  



Void element: All the elements in HTML do not require to have start tag and end tag, some elements does not have content and end tag such elements are known as Void elements or empty elements. These elements are also called as unpaired tag.



Some Void elements are <br> (represents a line break) , <hr>(represents a horizontal line), etc.


Nested HTML Elements: HTML can be nested, which means an element can contain another element.


Block-level and Inline HTML elements

For the default display and styling purpose in HTML, all the elements are divided into two categories:


Block-level element

Inline element

Block-level element:

These are the elements, which structure main part of web page, by dividing a page into coherent blocks.

A block-level element always start with new line and takes the full width of web page, from left to right.

These elements can contain block-level as well as inline elements.

Following are the block-level elements in HTML.


<address>, <article>, <aside>, <blockquote>, <canvas>, <dd>, <div>, <dl>, <dt>, <fieldset>, <figcaption>, <figure>, <footer>, <form>, <h1>-<h6>, <header>, <hr>, <li>, <main>, <nav>, <noscript>, <ol>, <output>, <p>, <pre>, <section>, <table>, <tfoot>, <ul> and <video>.


Note: All these elements are described in later chapters.

Example:

<!DOCTYPE html>  

<html>  

             <head>  

    </head>  

<body>  

    <div style="background-color: lightblue">This is first div</div>  

    <div style="background-color: lightgreen">This is second div</div>  

    <p style="background-color: pink">This is a block level element</p>  

</body>  

</html>  

Test it Now

Output:


Block-level and Inline HTML elements

In the above example we have used


tag, which defines a section in a web page, and takes full width of page.

We have used style attribute which is used to styling the HTML content, and the background color are showing that it's a block level element.


Inline elements:

Inline elements are those elements, which differentiate the part of a given text and provide it a particular function.

These elements does not start with new line and take width as per requirement.

The Inline elements are mostly used with other elements.

<a>, <abbr>, <acronym>, <b>, <bdo>, <big>, <br>, <button>, <cite>, <code>, <dfn>, <em>, <i>, <img>, <input>, <kbd>, <label>, <map>, <object>, <q>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <textarea>, <time>, <tt>, <var>.


Example:

<!DOCTYPE html>  

<html>  

    <head>  

    </head>  

<body>  

    <a href="https://www.javatpoint.com/html-tutorial">Click on link</a>  

    <span style="background-color: lightblue">this is inline element</span>  

    <p>This will take width of text only</p>  

 </body>  

</html>   

Test it Now

Output:


Block-level and Inline HTML elements

Following is the list of the some main elements used in HTML:


Start tag Content End tag Description

<h1> ...... <h6> These are headings of HTML </h1>??..</h6> These elements are used to provide the headings of page.

<p> This is the paragraph </p> This element is used to display a content in form of paragraph.

<div> This is div section </div> This element is used to provide a section in web page.

<br> This element is used to provide a line break. ( void element)

<hr> This element is used to provide a horizontal line. (void element)

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Attribute

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Attribute


HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML element.

Each element or tag can have attributes, which defines the behaviour of that element.

Attributes should always be applied with start tag.

The Attribute should always be applied with its name and value pair.

The Attributes name and values are case sensitive, and it is recommended by W3C that it should be written in Lowercase only.

You can add multiple attributes in one HTML element, but need to give space between two attributes.

Syntax

<element attribute_name="value">content</element> 


Example


 <!DOCTYPE html>  

<html>  

<head>  

</head>  

<body>  

    <h1> This is Style attribute</h1>  

   <p style="height: 50px; color: blue">It will add style property in element</p>  

    <p style="color: red">It will change the color of content</p>  

</body>  

</html>  



<p style="height: 50px; color: blue">It will add style property in element</p>  


In the above statement, we have used paragraph tags in which we have applied style attribute. This attribute is used for applying CSS property on any HTML element. It provides height to paragraph element of 50px and turns it colour to blue.


The title attribute in HTML

Description: The title attribute is used as text tooltip in most of the browsers. It display its text when user move the cursor over a link or any text. You can use it with any text or link to show the description about that link or text. In our example, we are taking this with paragraph tag and heading tag.


Example

With <h1> tag:


<h1 title="This is heading tag">Example of title attribute</h1>  

Test it Now

With <p> tag:


<p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will see a description as a tooltip</p>  

Test it Now

Code:


<!DOCTYPE html>  

<html>  

  <head>  

 </head>  

<body>  

      

  <h1 title="This is heading tag">Example of title attribute</h1>  

  <p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will see a description as a tooltip</p>  

  

</body>  

</html>  


The src Attribute

The src attribute is one of the important and required attribute of <img> element. It is source for the image which is required to display on browser. This attribute can contain image in same directory or another directory. The image name or source should be correct else browser will not display the image.


Example

<img src="whitepeacock.jpg" height="400" width="600">  


Quotes: single quotes or double quotes?

In this chapter you have seen that, we have used attribute with double quotes, but some people might use single quotes in HTML. So use of single quotes with HTML attribute, is also allowed. The following both statements are absolutely fine.


<a href="www.coderfunda.tk">A link to HTML.</a>  

<a href='www.coderfunda.tk'>A link to HTML.</a>  

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Attribute

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Attribute


HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML element.

Each element or tag can have attributes, which defines the behaviour of that element.

Attributes should always be applied with start tag.

The Attribute should always be applied with its name and value pair.

The Attributes name and values are case sensitive, and it is recommended by W3C that it should be written in Lowercase only.

You can add multiple attributes in one HTML element, but need to give space between two attributes.

Syntax

<element attribute_name="value">content</element> 


Example


 <!DOCTYPE html>  

<html>  

<head>  

</head>  

<body>  

    <h1> This is Style attribute</h1>  

   <p style="height: 50px; color: blue">It will add style property in element</p>  

    <p style="color: red">It will change the color of content</p>  

</body>  

</html>  



<p style="height: 50px; color: blue">It will add style property in element</p>  


In the above statement, we have used paragraph tags in which we have applied style attribute. This attribute is used for applying CSS property on any HTML element. It provides height to paragraph element of 50px and turns it colour to blue.


The title attribute in HTML

Description: The title attribute is used as text tooltip in most of the browsers. It display its text when user move the cursor over a link or any text. You can use it with any text or link to show the description about that link or text. In our example, we are taking this with paragraph tag and heading tag.


Example

With <h1> tag:


<h1 title="This is heading tag">Example of title attribute</h1>  

Test it Now

With <p> tag:


<p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will see a description as a tooltip</p>  

Test it Now

Code:


<!DOCTYPE html>  

<html>  

  <head>  

 </head>  

<body>  

      

  <h1 title="This is heading tag">Example of title attribute</h1>  

  <p title="This is paragraph tag">Move the cursor over the heading and paragraph, and you will see a description as a tooltip</p>  

  

</body>  

</html>  


The src Attribute

The src attribute is one of the important and required attribute of <img> element. It is source for the image which is required to display on browser. This attribute can contain image in same directory or another directory. The image name or source should be correct else browser will not display the image.


Example

<img src="whitepeacock.jpg" height="400" width="600">  


Quotes: single quotes or double quotes?

In this chapter you have seen that, we have used attribute with double quotes, but some people might use single quotes in HTML. So use of single quotes with HTML attribute, is also allowed. The following both statements are absolutely fine.


<a href="www.coderfunda.tk">A link to HTML.</a>  

<a href='www.coderfunda.tk'>A link to HTML.</a>  

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Tags

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Tags

HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag. But some HTML tags are unclosed tags.


When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.


An HTML file must have some essential tags so that web browser can differentiate between a simple text and HTML text. You can use as many tags you want as per your code requirement.



All HTML tags must enclosed within < > these brackets.

Every tag in HTML perform different tasks.

If you have used an open tag <tag>, then you must use a close tag </tag> (except some tags)

Syntax

<tag> content </tag>


HTML Tag Examples

Note: HTML Tags are always written in lowercase letters. The basic HTML tags are given below:

<p> Paragraph Tag </p>


<h2> Heading Tag </h2>

<b> Bold Tag </b>


<i> Italic Tag </i>


<u> Underline Tag</u>



Unclosed HTML Tags

Some HTML tags are not closed, for example br and hr.


<br> Tag: br stands for break line, it breaks the line of the code.


<hr> Tag: hr stands for Horizontal Rule. This tag is used to put a line across the webpage.


HTML Meta Tags

DOCTYPE, title, link, meta and style


HTML Text Tags

<p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <strong>, <em>, <abbr>, <acronym>, <address>, <bdo>, <blockquote>, <cite>, <q>, <code>, <ins>, <del>, <dfn>, <kbd>, <pre>, <samp>, <var> and <br>


HTML Link Tags

<a> and <base>


HTML Image and Object Tags

<img>, <area>, <map>, <param> and <object>


HTML List Tags

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


HTML Table Tags

table, tr, td, th, tbody, thead, tfoot, col, colgroup and caption


HTML Form Tags

form, input, textarea, select, option, optgroup, button, label, fieldset and legend


HTML Scripting Tags

script and noscript


Note: We will see examples using these tags in later charters.

HTML Tags List

Following is the complete list of HTML tags with the description which are arranged alphabetically.


Note: Here HTML Tags Listrepresents newly added Elements in HTML5.

HTML Tags by Alphabets

ABCDEFGHIJKLMNOPQRSTUVWXYZ

Tag name Description

<!-- --> This tag is used to apply comment in an HTML document.

<!DOCTYPE> This tag is used to specify the version of HTML

A

<a> It is termed as anchor tag and it creates a hyperlink or link.

<abbr> It defines an abbreviation for a phrase or longer word.

<acronym> It defines acronym for a word. (Not supported in HTML5)

<address> It defines the author's contact information of the HTML article

<applet> It defines an embedded Java applet. (Not supported in HTML5)

<area> It defines the area of an image map.

<article>HTML Tags List It defines the self-contained content.

<aside>HTML Tags List It defines content aside from main content. Mainly represented as sidebar.

<audio>HTML Tags List It is used to embed sound content in HTML document.

B

<b> It is used to make a text bold.

<base> This tag defines the base URL for all relative URL within the document.

<basefont> This tag is used to set default font, size and color for all elements of document. (Not supported in HTML5)

<bdi>HTML Tags List This tag is used to provide isolation for that part of text which may be formatted in different directions from its surrounding text.

<bdo> It is used to override the current text direction.

<big> This tag is used to make font size one level larger than its surrounding content. (Not supported in HTML5)

<blockquote> It is used to define a content which is taken from another source.

<body> It is used to define the body section of an HTML document.

<br> It is used to apply single line break.

<button> It is used to represent a clickable button

C

<canvas>HTML Tags List It is used to provide a graphics space within a web document.

<caption> It is used to define a caption for a table.

<center> It is used to align the content in center. (Not supported in HTML5)

<cite> It is used to define the title of the work, book, website, etc.

<code> It is used to display a part of programming code in an HTML document.

<col> It defines a column within a table which represent common properties of columns and used with the <colgroup> element.

<colgroup> It is used to define group of columns in a table.

D

<data>HTML Tags List It is used to link the content with the machine-readable translation.

<datalist>HTML Tags List It is used to provide a predefined list for input option.

<dd> It is used to provide definition/description of a term in description list.

<del> It defines a text which has been deleted from the document.

<details>HTML Tags List It defines additional details which user can either view or hide.

<dfn> It is used to indicate a term which is defined within a sentence/phrase.

<dialog>HTML Tags List It defines a dialog box or other interactive components.

<dir> It is used as container for directory list of files. (Not supported in HTML5)

<div> It defines a division or section within HTML document.

<dl> It is sued to define a description list.

<dt> It is used to define a term in description list.

E

<em> It is used to emphasis the content applied within this element.

<embed>HTML Tags List It is used as embedded container for external file/application/media, etc.

F

<fieldset> It is used to group related elements/labels within a web form.

<figcaption>HTML Tags List It is used to add a caption or explanation for the <figure> element.

<figure>HTML Tags List It is used to define the self-contained content, and s mostly refer as single unit.

<font> It defines the font, size, color, and face for the content. (Not supported in HTML5)

<footer>HTML Tags List It defines the footer section of a webpage.

<form> It is used to define an HTML form.

<frame> It defines a particular area of webpage which can contain another HTML file. (Not supported in HTML5)

<frameset> It defines group of Frames. (Not supported in HTML5)

H

<h1> to <h6> It defines headings for an HTML document from level 1 to level 6.

<head> It defines the head section of an HTML document.

<header>HTML Tags List It defines the header of a section or webpage.

<hr> It is used to apply thematic break between paragraph-level elements.

<html> It represents root of an HTML document.

I

<i> It is used to represent a text in some different voice.

<iframe> It defines an inline frame which can embed other content.

<img> It is used to insert an image within an HTML document.

<input> It defines an input field within an HTML form.

<ins> It represent text that has been inserted within an HTML document.

<isindex> It is used to display search string for current document. (Not supported in HTML5)

K

<kbd> It is used to define keyboard input.

L

<label> It defines a text label for the input field of form.

<legend> It defines a caption for content of <fieldset>

<li> It is used to represent items in list.

<link> It represents a relationship between current document and an external resource.

M

<main>HTML Tags List It represents the main content of an HTML document.

<map> It defines an image map with active areas.

<mark>HTML Tags List It represents a highlighted text.

<marquee> It is used to insert the scrolling text or an image either horizontally or vertically. (Not supported in HTML5)

<menu> It is used for creating a menu list of commands.

<meta> It defines metadata of an HTML document.

<meter>HTML Tags List It defines scalar measurement with known range or fractional value.

N

<nav>HTML Tags List It represents section of page to represent navigation links.

<noframes> It provides alternate content to represent in browser which does not support the <frame> elements. (Not supported in HTML5)

<noscript> It provides an alternative content if a script type is not supported in browser.

O

<object> It is used to embed an object in HTML file.

<ol> It defines an ordered list of items.

<optgroup> It is used to group the options of a drop-down list.

<option> It is used to define options or items in a drop-down list.

<output>HTML Tags List It is used as container element which can show result of a calculation.

P

<p> It represents a paragraph in an HTML document.

<param> It defines parameter for an <object> element

<picture>HTML Tags List It defines more than one source element and one image element.

<pre> It defines preformatted text in an HTML document.

<progress>HTML Tags List It defines the progress of a task within HTML document.

Q

<q> It defines short inline quotation.

R

<rp>HTML Tags List It defines an alternative content if browser does not supports ruby annotations.

<rt> It defines explanations and pronunciations in ruby annotations.

<ruby> It is used to represent ruby annotations.

S

<s> It render text which is no longer correct or relevant.

<samp> It is used to represent sample output of a computer program.

<script> It is used to declare the JavaScript within HTML document.

<section>HTML Tags List It defines a generic section for a document.

<select> It represents a control which provides a menu of options.

<small> It is used to make text font one size smaller than document?s base font size.

<source>>HTML Tags List It defines multiple media recourses for different media element such as <picture>, <video>, and <audio> element.

<span> It is used for styling and grouping inline.

<strike> It is used to render strike through the text. (Not supported in HTML5)

<strong> It is used to define important text.

<style> It is used to contain style information for an HTML document.

<sub> It defines a text which displays as a subscript text.

<summary>HTML Tags List It defines summary which can be used with <details> tag.

<sup> It defines a text which represent as superscript text.

<svg> It is used as container of SVG (Scalable Vector Graphics).

T

<table> It is used to present data in tabular form or to create a table within HTML document.

<tbody> It represents the body content of an HTML table and used along with <thead> and <tfoot>.

<td> It is used to define cells of an HTML table which contains table data

<template> It is used to contain the client side content which will not display at time of page load and may render later using JavaScript.

<textarea> It is used to define multiple line input, such as comment, feedback, and review, etc.

<tfoot> It defines the footer content of an HTML table.

<th> It defines the head cell of an HTML table.

<thead> It defines the header of an HTML table. It is used along with <tbody> and <tfoot> tags.

<time>HTML Tags List It is used to define data/time within an HTML document.

<title> It defines the title or name of an HTML document.

<tr> It defines the row cells in an HTML table

<track> It is used to define text tracks for <audio> and <video> elements.

<tt> It is used to define teletype text. (Not supported in HTML5)

U

<u> It is used to render enclosed text with an underline.

<ul> It defines unordered list of items.

V

<var> It defines variable name used in mathematical or programming context.

<video>HTML Tags List It is used to embed a video content with an HTML document

W

<wbr>HTML Tags List It defines a position within text where break line is possible.


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Tags

 Programing Coderfunda     October 17, 2020     HTML, HTML5     No comments   

HTML Tags

HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag. But some HTML tags are unclosed tags.


When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.


An HTML file must have some essential tags so that web browser can differentiate between a simple text and HTML text. You can use as many tags you want as per your code requirement.



All HTML tags must enclosed within < > these brackets.

Every tag in HTML perform different tasks.

If you have used an open tag <tag>, then you must use a close tag </tag> (except some tags)

Syntax

<tag> content </tag>


HTML Tag Examples

Note: HTML Tags are always written in lowercase letters. The basic HTML tags are given below:

<p> Paragraph Tag </p>


<h2> Heading Tag </h2>

<b> Bold Tag </b>


<i> Italic Tag </i>


<u> Underline Tag</u>



Unclosed HTML Tags

Some HTML tags are not closed, for example br and hr.


<br> Tag: br stands for break line, it breaks the line of the code.


<hr> Tag: hr stands for Horizontal Rule. This tag is used to put a line across the webpage.


HTML Meta Tags

DOCTYPE, title, link, meta and style


HTML Text Tags

<p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <strong>, <em>, <abbr>, <acronym>, <address>, <bdo>, <blockquote>, <cite>, <q>, <code>, <ins>, <del>, <dfn>, <kbd>, <pre>, <samp>, <var> and <br>


HTML Link Tags

<a> and <base>


HTML Image and Object Tags

<img>, <area>, <map>, <param> and <object>


HTML List Tags

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


HTML Table Tags

table, tr, td, th, tbody, thead, tfoot, col, colgroup and caption


HTML Form Tags

form, input, textarea, select, option, optgroup, button, label, fieldset and legend


HTML Scripting Tags

script and noscript


Note: We will see examples using these tags in later charters.

HTML Tags List

Following is the complete list of HTML tags with the description which are arranged alphabetically.


Note: Here HTML Tags Listrepresents newly added Elements in HTML5.

HTML Tags by Alphabets

ABCDEFGHIJKLMNOPQRSTUVWXYZ

Tag name Description

<!-- --> This tag is used to apply comment in an HTML document.

<!DOCTYPE> This tag is used to specify the version of HTML

A

<a> It is termed as anchor tag and it creates a hyperlink or link.

<abbr> It defines an abbreviation for a phrase or longer word.

<acronym> It defines acronym for a word. (Not supported in HTML5)

<address> It defines the author's contact information of the HTML article

<applet> It defines an embedded Java applet. (Not supported in HTML5)

<area> It defines the area of an image map.

<article>HTML Tags List It defines the self-contained content.

<aside>HTML Tags List It defines content aside from main content. Mainly represented as sidebar.

<audio>HTML Tags List It is used to embed sound content in HTML document.

B

<b> It is used to make a text bold.

<base> This tag defines the base URL for all relative URL within the document.

<basefont> This tag is used to set default font, size and color for all elements of document. (Not supported in HTML5)

<bdi>HTML Tags List This tag is used to provide isolation for that part of text which may be formatted in different directions from its surrounding text.

<bdo> It is used to override the current text direction.

<big> This tag is used to make font size one level larger than its surrounding content. (Not supported in HTML5)

<blockquote> It is used to define a content which is taken from another source.

<body> It is used to define the body section of an HTML document.

<br> It is used to apply single line break.

<button> It is used to represent a clickable button

C

<canvas>HTML Tags List It is used to provide a graphics space within a web document.

<caption> It is used to define a caption for a table.

<center> It is used to align the content in center. (Not supported in HTML5)

<cite> It is used to define the title of the work, book, website, etc.

<code> It is used to display a part of programming code in an HTML document.

<col> It defines a column within a table which represent common properties of columns and used with the <colgroup> element.

<colgroup> It is used to define group of columns in a table.

D

<data>HTML Tags List It is used to link the content with the machine-readable translation.

<datalist>HTML Tags List It is used to provide a predefined list for input option.

<dd> It is used to provide definition/description of a term in description list.

<del> It defines a text which has been deleted from the document.

<details>HTML Tags List It defines additional details which user can either view or hide.

<dfn> It is used to indicate a term which is defined within a sentence/phrase.

<dialog>HTML Tags List It defines a dialog box or other interactive components.

<dir> It is used as container for directory list of files. (Not supported in HTML5)

<div> It defines a division or section within HTML document.

<dl> It is sued to define a description list.

<dt> It is used to define a term in description list.

E

<em> It is used to emphasis the content applied within this element.

<embed>HTML Tags List It is used as embedded container for external file/application/media, etc.

F

<fieldset> It is used to group related elements/labels within a web form.

<figcaption>HTML Tags List It is used to add a caption or explanation for the <figure> element.

<figure>HTML Tags List It is used to define the self-contained content, and s mostly refer as single unit.

<font> It defines the font, size, color, and face for the content. (Not supported in HTML5)

<footer>HTML Tags List It defines the footer section of a webpage.

<form> It is used to define an HTML form.

<frame> It defines a particular area of webpage which can contain another HTML file. (Not supported in HTML5)

<frameset> It defines group of Frames. (Not supported in HTML5)

H

<h1> to <h6> It defines headings for an HTML document from level 1 to level 6.

<head> It defines the head section of an HTML document.

<header>HTML Tags List It defines the header of a section or webpage.

<hr> It is used to apply thematic break between paragraph-level elements.

<html> It represents root of an HTML document.

I

<i> It is used to represent a text in some different voice.

<iframe> It defines an inline frame which can embed other content.

<img> It is used to insert an image within an HTML document.

<input> It defines an input field within an HTML form.

<ins> It represent text that has been inserted within an HTML document.

<isindex> It is used to display search string for current document. (Not supported in HTML5)

K

<kbd> It is used to define keyboard input.

L

<label> It defines a text label for the input field of form.

<legend> It defines a caption for content of <fieldset>

<li> It is used to represent items in list.

<link> It represents a relationship between current document and an external resource.

M

<main>HTML Tags List It represents the main content of an HTML document.

<map> It defines an image map with active areas.

<mark>HTML Tags List It represents a highlighted text.

<marquee> It is used to insert the scrolling text or an image either horizontally or vertically. (Not supported in HTML5)

<menu> It is used for creating a menu list of commands.

<meta> It defines metadata of an HTML document.

<meter>HTML Tags List It defines scalar measurement with known range or fractional value.

N

<nav>HTML Tags List It represents section of page to represent navigation links.

<noframes> It provides alternate content to represent in browser which does not support the <frame> elements. (Not supported in HTML5)

<noscript> It provides an alternative content if a script type is not supported in browser.

O

<object> It is used to embed an object in HTML file.

<ol> It defines an ordered list of items.

<optgroup> It is used to group the options of a drop-down list.

<option> It is used to define options or items in a drop-down list.

<output>HTML Tags List It is used as container element which can show result of a calculation.

P

<p> It represents a paragraph in an HTML document.

<param> It defines parameter for an <object> element

<picture>HTML Tags List It defines more than one source element and one image element.

<pre> It defines preformatted text in an HTML document.

<progress>HTML Tags List It defines the progress of a task within HTML document.

Q

<q> It defines short inline quotation.

R

<rp>HTML Tags List It defines an alternative content if browser does not supports ruby annotations.

<rt> It defines explanations and pronunciations in ruby annotations.

<ruby> It is used to represent ruby annotations.

S

<s> It render text which is no longer correct or relevant.

<samp> It is used to represent sample output of a computer program.

<script> It is used to declare the JavaScript within HTML document.

<section>HTML Tags List It defines a generic section for a document.

<select> It represents a control which provides a menu of options.

<small> It is used to make text font one size smaller than document?s base font size.

<source>>HTML Tags List It defines multiple media recourses for different media element such as <picture>, <video>, and <audio> element.

<span> It is used for styling and grouping inline.

<strike> It is used to render strike through the text. (Not supported in HTML5)

<strong> It is used to define important text.

<style> It is used to contain style information for an HTML document.

<sub> It defines a text which displays as a subscript text.

<summary>HTML Tags List It defines summary which can be used with <details> tag.

<sup> It defines a text which represent as superscript text.

<svg> It is used as container of SVG (Scalable Vector Graphics).

T

<table> It is used to present data in tabular form or to create a table within HTML document.

<tbody> It represents the body content of an HTML table and used along with <thead> and <tfoot>.

<td> It is used to define cells of an HTML table which contains table data

<template> It is used to contain the client side content which will not display at time of page load and may render later using JavaScript.

<textarea> It is used to define multiple line input, such as comment, feedback, and review, etc.

<tfoot> It defines the footer content of an HTML table.

<th> It defines the head cell of an HTML table.

<thead> It defines the header of an HTML table. It is used along with <tbody> and <tfoot> tags.

<time>HTML Tags List It is used to define data/time within an HTML document.

<title> It defines the title or name of an HTML document.

<tr> It defines the row cells in an HTML table

<track> It is used to define text tracks for <audio> and <video> elements.

<tt> It is used to define teletype text. (Not supported in HTML5)

U

<u> It is used to render enclosed text with an underline.

<ul> It defines unordered list of items.

V

<var> It defines variable name used in mathematical or programming context.

<video>HTML Tags List It is used to embed a video content with an HTML document

W

<wbr>HTML Tags List It defines a position within text where break line is possible.


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Meta

Popular Posts

  • Write API Integrations in Laravel and PHP Projects with Saloon
    Write API Integrations in Laravel and PHP Projects with Saloon Saloon  is a Laravel/PHP package that allows you to write your API integratio...
  • Credit card validation in laravel
      Validation rules for credit card using laravel-validation-rules/credit-card package in laravel Install package laravel-validation-rules/cr...
  • iOS 17 Force Screen Rotation not working on iPAD only
    I have followed all the links on Google and StackOverFlow, unfortunately, I could not find any reliable solution Specifically for iPad devic...
  • C++ in Hindi Introduction
    C ++ का परिचय C ++ एक ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग लैंग्वेज है। C ++ को Bjarne Stroustrup द्वारा विकसित किया गया था। C ++ में आने से पह...
  • Send message via CANBus
    After some years developing for mobile devices, I've started developing for embedded devices, and I'm finding a new problem now. Th...

Categories

  • Ajax (26)
  • Bootstrap (30)
  • DBMS (42)
  • HTML (12)
  • HTML5 (45)
  • JavaScript (10)
  • Jquery (34)
  • Jquery UI (2)
  • JqueryUI (32)
  • Laravel (1017)
  • Laravel Tutorials (23)
  • Laravel-Question (6)
  • Magento (9)
  • Magento 2 (95)
  • MariaDB (1)
  • MySql Tutorial (2)
  • PHP-Interview-Questions (3)
  • Php Question (13)
  • Python (36)
  • RDBMS (13)
  • SQL Tutorial (79)
  • Vue.js Tutorial (68)
  • Wordpress (150)
  • Wordpress Theme (3)
  • codeigniter (108)
  • oops (4)
  • php (853)

Social Media Links

  • Follow on Twitter
  • Like on Facebook
  • Subscribe on Youtube
  • Follow on Instagram

Pages

  • Home
  • Contact Us
  • Privacy Policy
  • About us

Blog Archive

  • September (100)
  • August (50)
  • July (56)
  • June (46)
  • May (59)
  • April (50)
  • March (60)
  • February (42)
  • January (53)
  • December (58)
  • November (61)
  • October (39)
  • September (36)
  • August (36)
  • July (34)
  • June (34)
  • May (36)
  • April (29)
  • March (82)
  • February (1)
  • January (8)
  • December (14)
  • November (41)
  • October (13)
  • September (5)
  • August (48)
  • July (9)
  • June (6)
  • May (119)
  • April (259)
  • March (122)
  • February (368)
  • January (33)
  • October (2)
  • July (11)
  • June (29)
  • May (25)
  • April (168)
  • March (93)
  • February (60)
  • January (28)
  • December (195)
  • November (24)
  • October (40)
  • September (55)
  • August (6)
  • July (48)
  • May (2)
  • January (2)
  • July (6)
  • June (6)
  • February (17)
  • January (69)
  • December (122)
  • November (56)
  • October (92)
  • September (76)
  • August (6)

Loading...

Laravel News

Loading...

Copyright © CoderFunda | Powered by Blogger
Design by Coderfunda | Blogger Theme by Coderfunda | Distributed By Coderfunda