What is hypertext markup language (HTML) head?

This is a recommends products dialog
Top Suggestions
Starting at
View All >
Language
French
English
ไทย
German
繁體中文
Country
Hi
All
Sign In / Create Account
language Selector,${0} is Selected
Register & Shop at Lenovo Pro
Register at Education Store
Pro Tier Benefits
• Save up to an extra 20% on Think everyday pricing.
• Spend $15K, advance for FREE to Plus Tier with increased benefits.
Plus Tier Benefits
• Save up to an extra 25% on Think everyday pricing.
• Spend $50K, advance for FREE to Elite Tier with increased benefits.
Elite Tier Benefits
• Save up to an extra 30% on Think everyday pricing.
Reseller Benefits
• Access to Lenovo's full product portfolio
• Configure and Purchase at prices better than Lenovo.com
View All Details >
more to reach
PRO Plus
PRO Elite
Congratulations, you have reached Elite Status!
Pro for Business
Delete icon Remove icon Add icon Reload icon
TEMPORARILY UNAVAILABLE
DISCONTINUED
Temporary Unavailable
Cooming Soon!
. Additional units will be charged at the non-eCoupon price. Purchase additional now
We're sorry, the maximum quantity you are able to buy at this amazing eCoupon price is
Sign in or Create an Account to Save Your Cart!
Sign in or Create an Account to Join Rewards
View Cart
Your cart is empty! Don’t miss out on the latest products and savings — find your next favorite laptop, PC, or accessory today.
Remove
item(s) in cart
Some items in your cart are no longer available. Please visit cart for more details.
has been deleted
Please review your cart as items have changed.
of
Contains Add-ons
Subtotal
Proceed to Checkout
Yes
No
Popular Searches
What are you looking for today ?
Trending
Recent Searches
Hamburger Menu


What is hypertext markup language (HTML) head?

The HTML head element is a container that holds metadata for a web page. You can include information like the character set, linked stylesheets, scripts, and other details that aren't displayed on the actual page itself.

What happens if I forget to include the head in my HTML?

If you forget to include the head section in your HTML, most modern browsers will still render the page correctly. They'll infer the missing parts, but it might lead to inconsistent results across different browsers or miss out on some metadata like specific character encoding.

What if I want to link to a favicon in the head?

If you want to link to a favicon, you can do so in the head section using the element with the appropriate attributes. This small icon will then appear in the browser's tab, providing a visual identification for your site.

What is the purpose of the base tag in the HTML head?

The base tag specifies a base uniform resource locator (URL) for relative URLs in a document. By defining a base URL in the head section, you make it easier to manage links and references throughout your site, especially if you have multiple pages linking to the same resources.

When should I update the content inside the HTML head?

You should update the content inside the HTML head when making changes to the meta information, adding or updating linked resources like cascading style sheets (CSS) or JavaScript files, or when optimizing for search engine optimization (SEO) or social media sharing. Regular reviews can help maintain the site's performance and discoverability.

What happens if I don't include a doctype declaration before the HTML head?

If you don't include a doctype declaration before the HTML head, browsers might render the page in "quirks mode." This can lead to inconsistent appearances across different browsers, as they will use outdated rendering rules. It's advisable to include a proper doctype for modern standards compliance.

Can I control caching behavior through the HTML head?

Yes, you can control caching behavior through meta tags in the HTML head. By setting specific cache-control directives, you can instruct browsers how to cache your webpage, either forcing regular updates or allowing the content to be cached for quicker loading.

Does the HTML head have a specific size limit?

There's no specific size limit for the HTML head but keeping it optimized is essential. Including too many scripts, stylesheets, or unnecessary meta tags might slow down the page's loading time, so it's wise to include only what's needed for the webpage.

Can I include more than one title tag in the HTML head?

While it's possible to include more than one title tag in the HTML head, it's not advised. Most browsers will only consider the first title tag and ignore the rest. Multiple title tags can create confusion and might not align with best practices.

Could I link to simple syndication (RSS) feeds through the HTML head?

Yes, you can link to RSS feeds through the HTML head by using the link tag with the rel attribute set to "alternate" and specifying the correct multipurpose internet mail extensions (MIME) type. This allows users and browsers to discover and subscribe to the feeds, keeping them updated with your content.

Can I set cookies through the HTML head?

While you can't directly set cookies through the HTML head, you can link to a JavaScript file that sets cookies. The script tag linking to the file would be placed in the head, and the actual code to set cookies would be in the linked JavaScript file.

What happens if I link to a non-existent cascading style sheet (CSS) file in the head?

If you link to a non-existent CSS file in the head, the browser will attempt to fetch it and fail, resulting in a 404 error. It won't break the webpage, but it might slow down the loading process slightly and leave some intended styles missing.

Can I include conditional comments in the HTML head?

Yes, you can include conditional comments in the HTML head to target specific versions of internet explorer. These comments allow you to write code that will only be read by certain versions of internet explorer (IE), enabling you to handle browser-specific issues.

Should I include the HTML head on every page of my website?

Yes, you should include the HTML head on every page of your website. It contains essential information like meta tags, linked stylesheets, and scripts that need to be present on each page for consistent styling, functionality, and search engine optimization (SEO) optimization.

Could I include a rel=canonical tag in the head, and what does it do?

Yes, you can include a rel=canonical tag in the head to specify the preferred version of a webpage. It helps search engines understand which uniform resource locator (URL) should be considered the "canonical" version, preventing duplicate content issues and helping with search engine optimization (SEO).

What if I include my styles directly in the head without using a link or style tag?

Including styles directly in the head without using a link or style tag will cause those styles to be ignored by the browser. Always use a style tag for internal cascading style sheets (CSS) or a link tag for external stylesheets to ensure that the styles are applied correctly.

Could I use the HTML head to redirect users to another page?

Yes, you can use a meta refresh tag in the HTML head to redirect users to another page after a specified number of seconds. While this method works, it's generally better to use hypertext transfer protocol (HTTP) status codes for redirection, as they are more efficient and search engine optimization (SEO)-friendly.

Could I include audio or video files in the HTML head?

No, audio or video files should not be included in the HTML head, as the head is reserved for meta information, linked resources, and scripts. Audio or video content should be placed in the document's body using appropriate tags.

What is the meta referrer tag in the HTML head, and why is it used?

The meta referrer tag in the HTML head controls the referrer information sent with requests from your page. By setting different policies, you can control the amount of referrer information shared, enhancing privacy or aligning with various cross-origin request requirements.

{"pageComponentDataId":"e857fdeft7e51-4b61-84dc-bccec6e68e00","pageComponentId":"e857fdeft7e51-4b61-84dc-bccec6e68e00","isAssociatedRelease":"true","pageComponentDataLangCode":"en_au","configData":{"jumpType":"currentTab","headlineColor":"black","displayNumber":"","styleMode":"vertical","miniCardHoMode":"2","headline":"","products":[{"number":{"t_id":"21kccto1wwau5","language":{"en_nz":"21kccto1wwau5","en_au":"21kccto1wwau5","en":""},"id":"Pageb33ce4b8-4839-4ba3-b993-7296d68a91b8"}},{"number":{"t_id":"21mccto1wwau3","language":{"en_nz":"21mccto1wwau3","en_au":"21mccto1wwau3","en":""},"id":"Page1fa61927-074c-4fe0-a8df-5c94362fb75c"}},{"number":{"t_id":"21lkcto1wwau3","language":{"en_nz":"21lkcto1wwau3","en_au":"21lkcto1wwau3","en":""},"id":"Pageca014688-410e-439a-a4c6-bba2ef6d4715"}},{"number":{"t_id":"21g2cto1wwau3","language":{"en_nz":"21g2cto1wwau3","en_au":"21g2cto1wwau3","en":""},"id":"Page79cd32c8-d467-4d68-b955-d273bb24eda7"}}]},"urlPrefix":"AAAAAAAH","title":"glossary-right-blue-boxes-fragment","pageId":"65b55929-de05-417a-a92a-ccb888d329b0","urlEdit":0,"uri":"/FragmentDirectory/glossary/glossary-right-blue-boxes-fragment.frag","pageComponentUuid":"e857fdeft7e51-4b61-84dc-bccec6e68e00"}
coming coming
Starting at
List Price
Web Price
Web Price:
List Price
Web Price
List Price is Lenovo’s estimate of product value based on the industry data, including the prices at which first and third-party retailers and etailers have offered or valued the same or comparable products. Third-party reseller data may not be based on actual sales.
Web Price is Lenovo’s estimate of product value based on industry data, including the prices at which Lenovo and/or third-party retailers and e-tailers have offered or valued the same or comparable products. Third-party data may not be based on actual sales.
Learn More
See More
See Less
View {0} Model
View {0} Models
Part Number:
Features
See More
See Less
compare
Added!
Great choice!
You may compare up to 4 products per product category (laptops, desktops, etc). Please de-select one to add another.
View Your Comparisons
Add To Cart
Add To Cart
We're sorry,
Products are temporarily unavailable.
Continue shopping
Learn More
Coming Soon
Featured Product
Top Deals of the Day
Oops! No results found. Visit the categories above to find your product.
Save
open in new tab
© 2024 Lenovo. All rights reserved.
© {year} Lenovo. All rights reserved.
Compare  ()
x