What is head, title and style in HTML?
<head> element is the container for all the head elements in HTML. Its is like the human head which contains all the important things stored in it. Elements inside the head in HTML can contain scripts, links, instructing the browser where to find the style sheet. The head element may also include other meta data and more information. With advancement in Web technologies, the meta information is necessary.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Head Title and Style</title>
<script type="text/javascript">
//nothing here for the moment
</script>
</head>
<title> tag displays the title name on the title bar or on the tab of the web browser (Modern browsers have tab format only). This tag also provides a title when the webpage gets added to favorites, bookmarks or even in the search engines.
<style> tag used in the html file is for internal CSS. The tag is used to define style information for an HTML document. Internal CSS is added in the head of the html file and is faster as compared to external CSS. <style> tags are responsible for the looks of the webpages.
<style>
body{
background-color: aquamarine;
}
</style>
One Reply on “In Depth with the head, title and style HTML tags”