Showing posts with label html meta tag. Show all posts
Showing posts with label html meta tag. Show all posts

Sunday, July 24, 2022

html meta tag

 META Description

    

Meta tag



Meta elements are tags used in HTML and XHTML documents to provide structured metadata about a Web page. They are part of a web page's head section. Multiple Meta elements with different attributes can be used on the same page. 

<meta name="keywords" content="HTML, CSS, JavaScript"> <meta name="author" content= "Web desigining">

The <meta> tag defines metadata about an HTML document. Metadata is data (information) about data. The <meta> tag also supports the Global Attributes in HTML.

<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.

Meta elements are tags used in HTML and XHTML documents to provide structured metadata about a Web page. They are part of a web page's head section. Multiple Meta elements with different attributes can be used on the same page. 

The head of an HTML document is the part that is not displayed in the web browser when the page is loaded. It contains information such as the page <title>, links to CSS (if you choose to style your HTML content with CSS), links to custom favicons, and other metadata (data about the HTML, such as the author, and important keywords that describe the document). Web browsers use information contained in the head to render the HTML document correctly.

 Search engines such as Google use metadata from meta tags to understand additional information about the webpage. They can use this information for ranking purposes, to display snippets in search results, and sometimes they can ignore meta tags. Example of meta tags include the <title> and <description> elements.


Syntax 

<head>

  <meta charset="utf-8">

  <title>My test page</title>

</head>


Meta html details information


Attributes of the META Element


1) Charset

Value  -  character_set

Description :-

<title>Specifying Metadata-</title>

 <meta charset="UTF-8">

 Specifies the character encoding for the HTML document. tells the browser to use the utf-8 character encoding when translating machine code into human-readable text and vice versa to be displayed in the browser.

The purpose of the charset parameter is to specify the encoding of the external script in cases where the encoding is not specified at the HTTP protocol level. It is not meant to override encoding information in HTTP headers.

UTF-8 (UCS Transformation Format 8) is the World Wide Web's most common character encoding. Each character is represented by one to four bytes. UTF-8 is backward-compatible with ASCII and can represent any standard Unicode character.



2)  Contents

Value - some_text

Description:-

The property is used to insert generated content in a web page and it is fully supported in all major browsers.

Text Specifies the value associated with the http-equiv or name attribute. The HTML content Attribute is used to given the values that are related to the http-equiv or name attribute. The content attribute can associated with the <meta> element. Content elements are individual design and user experience (UX) components that tie messaging and brand experiences together. As a standalone piece, a content element does not convey the brand message or vision. When content elements work seamlessly into the messaging, they help bring the content vision to life.



3)  http-equiv

Value :- content-security-policy content-type default-style refresh

Description:-

 The http-equiv attribute provides an HTTP header for the information/value of the content attribute. The http-equiv attribute can be used to simulate an HTTP response header. http-equiv = "content-type" Indicates that the meta element is in the encoding declaration state and represents a character encoding declaration. content = meta-charset string. A specially formatted string providing a character encoding name.


4) name 

Value :-   author.description, keywords generator.revised, others

Description :-

<meta name="description" content="HTML Basics">

The name attribute specifies the name of an <input> element. The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.

The name attribute specifies a name for an HTML element. This name attribute can be used to reference the element in a JavaScript. For a <form> element, the name attribute is used as a reference when the data is submitted. For an <iframe> element, the name attribute can be used to target a form submission.

The attribute identifier, also called attribute name, is a string that identifies an attribute. An attribute value is the content of the attribute and its type is not restricted to that of string. You use an attribute name when you want to specify a particular attribute for either retrieval, searches, or modification.


Related post

radio button html
html form
list tag
unordered list