# HTML Head
● The HTML <head> Element
The <head> element is a container for metadata and is placed between the <html> tag and the <body> tag.
HTML metadata is data about the HTML document. Metadata is not displayed.
Metadata typically define the document title, character set, styles, links, scripts, and other meta information.
HTML metadata is data about the HTML document. Metadata is not displayed.
Metadata typically define the document title, character set, styles, links, scripts, and other meta information.
● The HTML <title> Element
The <title> element defines the title of the document, and is required in all HTML/XHTML documents.
The <title> element.
The <title> element.
- defines a title in the browser tab
- provides a title for the page when it is added to favorites
- displays a title for the page in search engine results
● The HTML <meta> Element
The <meta> element is used to specify which character set is used, page description, keywords, author, and other metadata.
Metadata is used by browsers, by search engines, and other web services.
Metadata is used by browsers, by search engines, and other web services.
● Setting The Viewport
HTML5 introduced a method to let web designers take control over the viewport, through the <meta> tag. The Viewport is the user's visible area of a web page. It varies with the device, and will be smaller on a mobile phone than on a computer screen. Designer should include the following <meta> viewport element in all web pages.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling.
The width=device-width part sets the width of the page to follow the screen-width of the device.
The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling.
The width=device-width part sets the width of the page to follow the screen-width of the device.
The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.
● The HTML <base> Element
The <base> element specifies the base URL and base target for all relative URLs in a page.
● Omitting <html>,<head> and <body>.
According to the HTML5 standard, the <html>, the <body> and the <head> tag can be omitted.
No comments:
Post a Comment