EDITORCLASSBLOGLOGINOpkleOpkle, the Editor for CreatorsInfiniteExpression,In New Forms.New ContentOpkle makes an editor so anyone can build for the web without code, and share it anywhere.Blending text and screen, we build tools that make the web about imagination, not code.How HTML Became the Language of Documentshtml1HTML Basics: How to Give Text Its Rolehtml2HTML Attributes: Giving Names to Text and Elementshtml3HTML, Head, Body: The Three Spaces of a Web Documenthtml4What Goes Inside the head Tag?html514151617185 What Goes Inside the head Tag?

Because the head is a place you cannot see, it is easy for someone learning HTML for the first time to feel it is an empty room. But the head is not empty at all. Important agreements gather here: what name the browser tab will show, how Korean letters and emoji should be read, what width a phone should calculate the screen at, and where the document's styling rules and behavior should come from. The head is not a place that hides the body text. It is the control room that prepares the document so that the body can be read and run properly.

You don't put just any tag inside the head. Content to show readers directly, like titles, paragraphs and photos, stays in the body, and only information that introduces the whole document, connects it to other materials, or tells the browser something in advance goes in the head. In this article, we look in turn at `title`, `meta`, `link`, `style`, `script` and `base`, the tags beginners meet most often in real HTML documents. Each is a short tag, yet each greatly changes how a page is discovered from outside and prepared on the inside.

The `〈 〉` you see in the examples is written to resemble the angle brackets of real HTML, for explanation's sake. For now you needn't try to memorize a single character. If you first understand “what does this tag tell?” and “who uses that information?”, the grammar follows far more naturally.

1.We tell apart again the information that goes in the head and the content that goes in the body.

2.We learn about `title` and `meta`, which handle a document's name and basic settings.

3.We look at the roles of `link`, `style` and `script`, which load or connect other files.

4.We go as far as `base`, which is not used often but changes the reference point for addresses.

The Head Is Where a Document's Information Cards Gather

Before you hand a book to readers, you need the cover title, the author's name, a short sentence introducing the book, and information about printing and classification. This information is not the novel's body, but it is essential for finding the book, opening it and reading it properly. The head does the same work. It collects the information cards that browsers, search services and screen readers consult before they meet the web document.

So the head does not usually hold sentences meant to show on the screen. A title like `〈h1〉Today's Exhibition〈/h1〉`, along with photos and buttons, belongs to the body. Instead, it holds tags that tell you, “What is this document's official name?”, “How should the letters and symbols be read?” and “In which file are this document's color and font rules?” The head explains and prepares the document, but unlike the body it does not talk directly with the reader.

In the HTML standard, the head is defined as a collection of information about the document, that is, metadata. An ordinary web document must have one title, and base may appear at most once. But beginners needn't put in every possible tag from the start. A short, clean head that holds exactly the information needed is far better than a head that is long for no reason.

The Head Tags You Meet Most Often

`title`: Tells browsers and readers the document's name.

`meta`: Writes basic information such as characters, the screen and a document introduction.

`link`: Connects the document to outside materials such as styling rules and icons.

`style`: Writes short styling rules that apply only inside this document.

`script`: Connects or writes JavaScript that holds the actions the page should perform.

`base`: Sets a shared reference for reading relative addresses. It is not used often.

`title` Is the Page's Official Name

`title` is the first tag in the head you should get to know. When you write a document's name, as in `〈title〉Spring Indie Publishing Class | Opkle〈/title〉`, that wording is usually used whenever the page is called by name outside its body: in the browser tab, the visit history, bookmarks and search results. It is also a name tag that lets a reader with many tabs open recognize which page they are looking at right now.

The title resembles the body's big heading `h1`, but they do not do the same job. The body's h1 shows the subject of the text to a reader who has already come into the page. The title, on the other hand, has to let people recognize “what this page is” even when the document stands alone, as in search results or bookmarks. That is why, even when the h1 is short, like “HTML Basics,” the title often adds a little more context, like “HTML Basics: Understanding Tags and Attributes Easily | Opkle.”

A document usually has just one title. If you attach several different name tags, it becomes unclear to browsers and readers which one to accept as the representative name. Also, since the title is not a sentence that appears in the body of the screen, it is better to prepare a separate heading in the body that readers will actually read. The two headings point to the same document, but each helps a different reader from a different place.

`meta` Holds a Document's Small Descriptions and Basic Settings

`meta` is not a tag with a single role, but a small note card that can hold many kinds of document information. Depending on which note it is, the attribute's name and content change. So when you first see meta, many lines look alike and confusing, but if you sort them by the question each one answers, they become easy to read.

First, `〈meta charset="UTF-8"〉` tells how to read this document's characters and symbols. UTF-8 is a widely used agreement for expressing many kinds of characters together, such as Korean, English and emoji. When this information is written properly, you can reduce cases where “Hello” appears as garbled symbols. It is a very basic preparation for letters to look right on a page.

`〈meta name="viewport" content="width=device-width, initial-scale=1"〉` tells how to treat a phone screen. It seems to contain many unfamiliar words, but the meaning is simple. It is a request: “Calculate the page's width to match this device's screen width right now, and start with a natural zoom level.” Think of it as a note that helps a page made only on a computer avoid looking far too small on a small screen.

`〈meta name="description" content="An easy, from-the-start explanation of HTML basics."〉` is the place to write a one-line introduction to the document. Search and sharing services can refer to this description, but they do not promise to always show it as written. Still, if you summarize the page's content briefly and honestly, it is a good starting point for people and tools to understand the document.

Besides these, there are metas that tell search services how to treat a page, metas that name the creator, and more. But first remember three things. charset is the setting that lets letters be read correctly, viewport is the setting that makes the page fit the screen, and description is the sentence that introduces the document.

Reading meta Examples as Questions

`charset="UTF-8"`: By what agreement should this document's character shapes and symbols be read?

`name="viewport"`: By what standard should a phone screen be calculated?

`name="description"`: If you introduced this document briefly from outside, what would you say?

`content="…"`: The concrete answer to the question just before it.

`link` Connects the Document to Outside Materials

`link` has the same name as the body's link that readers click to move, but it does a different job. The head's link quietly connects the document to another file or resource. The most common example is `〈link rel="stylesheet" href="style.css"〉`. `rel` says what kind of relationship this connection is, and `href` tells the address of the file to connect. This line means, “style.css holds the styling rules that decide how this document looks. Please fetch that file and apply it.”

With link, many pages can share a single file of styling rules. Just as every chapter of a book follows the same editorial principles, many HTML documents can share the same fonts, margins and color rules. And when you want to change a rule, fixing the one connected file updates many pages, which grows more convenient the longer you maintain the documents.

link is also used to connect a site's small icon. `〈link rel="icon" href="favicon.png"〉` tells the location of the site icon you see in the browser tab or bookmarks. There are also connections like `rel="canonical"`, which names the representative address when the same content lives at several addresses. For now it is enough to hold on to this: `rel` says “what kind of relationship,” and `href` says “where it is.”

`style` Is a Small Set of Styling Rules Written Inside the Document

`style` is the place to write, directly inside the head, the CSS rules that decide how a document looks, such as its colors, fonts and margins. You can use it, for example, to put in a very short bit of styling needed only on one page. If link fetches “a styling rulebook that lives outside,” style is closer to “writing a styling memo directly inside this document's preparation room.”

This does not mean either one is unconditionally better. If a rule is needed only briefly on a single page, style can be simple, and if a rule will be shared by many pages, connecting a separate file with link is tidier. At first, rather than the detailed CSS grammar inside style, it helps to remember the division of labor: HTML speaks of a document's structure, and CSS decides the look of that structure.

The rules inside style are applied to the screen, but the text inside the style tag does not look like a paragraph to the reader. This shows well what the head does. The lighting and margins set in the preparation room change the mood of the living room, but the lighting blueprint is not pasted on the living-room wall as sentences.

`script` Prepares the Actions a Page Should Perform

If HTML builds a document's structure and CSS decides its look, JavaScript takes the role of making the page respond and move. `script` is the tag that connects that JavaScript to the document or writes it directly. It is used, for example, for actions like opening and closing a menu when it is clicked, checking what someone typed, or replacing part of the screen with new information.

A form you often see inside the head is `〈script src="app.js" defer〉〈/script〉`. `src` is the location of the file that holds the actions, and `defer` tells the browser, “You may run this file after reading the body's document first.” With this agreement, you can help the browser avoid stopping its flow of reading the body for no reason. At first, rather than writing a lot of script yourself, it is enough to understand that this tag is a channel through which a document gains behavior.

A script can be placed in the head, but it is not a tag used only in the head. Depending on the page's order of work and when it is needed, it is sometimes placed at the end of the body. What matters is that the contents of a script too are not body text for readers to read, like a title or paragraph. Because it is information that prepares instructions for the browser to run, it can greatly affect the page's experience even though it does not appear on screen.

`base` Sets the Starting Point for All Relative Addresses

`base` is not a tag beginners will use often right away, but it is worth knowing what it means if you occasionally meet it in the head. When you write short addresses rather than full ones many times in a document, like `images/cover.jpg` or `about.html`, it decides where those addresses should be read from. If you put `〈base href="https://example.com/books/"〉`, the short addresses that follow are interpreted with this address as their starting point.

It is similar to not starting from the city name every time when you talk about several places in the same neighborhood. If you first set a shared reference, “roads inside this neighborhood,” the addresses that follow can be written short. However, because a single base can affect how many addresses are interpreted, such as links, images and style files, you needn't put it in as a habit from the beginning. It is better to use it carefully, only when you must unify the reference address of many files.

A document can have only one base, and it is usually placed ahead of the other tags that refer to addresses. Mixing several reference addresses is like having signposts that guide readers point in different directions. The key to learning base is not writing lots of grammar, but understanding that even a short address always starts from some reference address.

A Good Head Prepares Exactly the Information That Is Needed

Inside the head tag, many more special cases and tool-specific settings can go. But for a basic web document, you can make a solid start with just this: set the name with title, state the characters, screen and introduction with meta, and connect shared styling rules with link. Add style and script only as much as needed, and bring out base only when you truly must change the reference for addresses.

The head's tags are not as eye-catching as the body. Yet this invisible preparation is behind a page title being readable on the browser tab, Korean letters not breaking, content looking right on a phone, and pages of the same site continuing with a consistent look. The head is not a complicated technology hiding behind the page, but the document's agreement, written down first so that readers can meet the body better.

Key Takeaways

The head holds a document's name, settings and connection information, rather than body text.

`title` is the official name by which a document is called in tabs, bookmarks, search and more.

`meta` holds basic information such as characters, the phone screen and a document introduction.

`link` and `style` prepare the page's look, and `script` prepares the page's behavior.

`base` is a rare but powerful tag that sets a common starting point for short addresses.

PreviousListNext
CopyrightAll design outputs and videos on this website are copyrighted by Abstract Cloud and protected under copyright law and related regulations. All content, including web, video, text, cover, and interior designs, is the property of the copyright holder. Unauthorized reproduction, distribution, creation of derivative works, or online sharing without prior consent is strictly prohibited. Violations may result in civil and criminal liability under copyright law. Legitimate purchases and copyright protection preserve creators' rights and fuel better works in return.Copyright: Abstract Cloud | CEO: Bae Changkyu
© Abstract Cloud. All Rights Reserved.
HOMEFAQTerms of ServicePrivacy PolicyRefund PolicySeller Informationhelp@opkle.app
+82 10-2747-3403
Business Name :Abstract Cloud  |  CEO :Bae ChangkyuBusiness Registration Number :249-74-00533E-commerce Registration Number :2025-Uijeongbu Songsan-0634Address :402, 108-dong, 49 Buyong-ro, Uijeongbu-si, Gyeonggi-do, Republic of KoreaAll content, designs, and source code on this website
are copyrighted by Opkle.
Opkle