HTML5 Head Tag – Meta Tags in SEO | How To Add Code in Head Tag in HTML5 | HTML5 Tutorial In this video, I will explain to you the head section of HTML & WordPress files. You can see on this video a very detailed discussion on the head section tag that I will use on the head section. You have to understand this basic concept that the head section uses only informative content like your links, meta tags, title, and other information.
The <head> includes the following elements:
- The <title> tag defines the title of a web page (required). It may be confused with the <h1> tag, but they are different. The <h1> tag specifies the title of page content, whereas the <title> tag is metadata representing the title of the entire HTML content and not its content.
- The <style> tag contains CSS code that defines how HTML elements should be rendered in a browser.
- The <base> tag defines an absolute (base) URL for all relative URLs.
- The <link> tag defines the relationship between the current HTML document and the resource to which it refers, or contains a link to an external style sheet. It can have two attributes: rel=” stylesheet” and href.
- The <meta> tag provides additional information (metadata) about HTML document. The <head> of a page can include different kinds of <meta> elements that may contain name and content attributes.
- The <noscript> tag defines an alternate text, which is displayed if the browser doesn’t support scripts or scripts are disabled by the user.
HTML <head> ELEMENT
<head>element is a container for metadata (data about data) and is placed between the
<html>tag and the
- HTML metadata is data about the HTML document. Metadata is not displayed.
- Metadata typically defines the document title, character set, styles, scripts, and other meta information.
HTML <title> ELEMENT
<title>the element defines the title of the document.
- The title must be text-only, and it is shown in the browser’s title bar or in the page’s tab.
<title>element is required in HTML documents!
- The contents of a page title are very important for search engine optimization (SEO)! The page title is used by search engine algorithms to decide the order when listing pages in search results.
HTML <style> ELEMENT
<style> element is used to define style information for a single HTML page:
HTML <link> ELEMENT
<link>element defines the relationship between the current document and an external resource.
<link>tag is most often used to link to external style sheets.
HTML <meta> ELEMENT
<meta>element is typically used to specify the character set, page description, keywords, author of the document, and viewport settings.
<meta> Tag Examples:
- Define the character set used: <meta charset=”UTF-8″>
- Define a description of your web page: <meta name=”description” content=”Free Web tutorials”>
- Define the author of a page: <meta name=”author” content=”John Doe”>
- Refresh document every 30 seconds: <meta http-equiv=”refresh” content=”30″>
- Setting the viewport to make your website look good on all devices <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>