Automatically translated.View original post

Make header of website page

# Web Site Writing Basics

# csshtml

CSS Header is not a specific term, but refers to the use of CSS (Cascading Style Sheets) to format the header of a web page, a section that is often at the top of a web page and contains logos, navigation menus, and other important information. CSS is used to characterize headers such as background colors, font size, layout, and other elements to make them look beautiful and orderly.

What is the header of a web page?

It is a component of the page at the top.

It stores important information of the website, such as logos, navigation menus, and text.

Use the < h1 > to < h6 > tags in HTML to determine the priority level of various topics.

It may be formatted with CSS to improve the overall design of the page.

What is the use of CSS with Header (Header)?

Defines style:

Use CSS properties to determine the nature of the header, such as:

Background-color for background color

Color for font color

Other features for size, alignment, and other styles

Structure:

Use CSS in conjunction with HTML to structure the header.

Added interest:

Using CSS makes headers more attractive and improves overall layout and design.

Example:

You can use CSS to set the background color of the header as follows:

Code

< header style = "background-color: darkblue;" >

< h1 > Welcome < / h1 >

< p > This is the website header. < / p >

< / head >

2025/8/29 Edited to

... Read moreเวลาเริ่มทำเว็บ เรามักเจอคำถามว่า “ส่วนประกอบของเว็บไซต์มีอะไรบ้าง?” ส่วนตัวผมชอบแยกเป็น 3 ส่วนหลัก ๆ เพื่อให้วางโครงสร้างง่ายและแก้ไขทีหลังสะดวก ได้แก่ Header, Main content และ Footer ซึ่งบทความนี้โฟกัสที่ Header แต่ขอเสริมภาพรวมให้ครบ เผื่อคุณกำลังทำเว็บหน้าแรก/ติดต่อเรา/เกี่ยวกับเราอยู่พอดี 1) Header (ส่วนหัวเว็บไซต์) Header คือพื้นที่ด้านบนสุดของหน้าเว็บ ใช้สื่อสารตัวตนของเว็บและช่วยให้คน “ไปต่อ” ได้ทันที โดยองค์ประกอบที่เจอบ่อยคือ - โลโก้/ชื่อเว็บ (มักอยู่ซ้าย) - เมนูนำทาง (Navigation) เช่น หน้าแรก, เกี่ยวกับเรา, ติดต่อเรา - ช่องค้นหา/ปุ่ม CTA (ถ้ามี) เช่น สมัครสมาชิก/สั่งซื้อ ทิปจากที่ลองทำเอง: อย่าใส่เมนูเยอะเกินไป 4–6 เมนูกำลังอ่านง่าย และควรทำให้กดได้ชัด (พื้นที่คลิกกว้างพอ) 2) Main (เนื้อหาหลัก) ส่วนนี้คือ “ตัวจริง” ของหน้า เช่น เนื้อหาบทความ สินค้า ฟอร์มติดต่อ แกลเลอรี ฯลฯ แนะนำให้ใช้แท็ก semantic เช่น <main>, <section>, <article> เพื่อให้โครงสร้างเว็บชัด ทั้งคนอ่านและ Google เข้าใจง่าย 3) Footer (ส่วนท้าย) Footer มักรวมข้อมูลที่คนหาในตอนท้าย เช่น ลิงก์ซ้ำของเมนู, ที่อยู่, โซเชียล, ลิขสิทธิ์, เงื่อนไข/นโยบาย ตัวอย่างโครงสร้าง Header ที่ใช้บ่อย (แยก HTML/CSS เป็นระบบ) HTML: <header class="site-header"> <div class="container"> <a class="brand" href="#">Slak</a> <nav class="nav"> <a href="#">หน้าแรก</a> <a href="#">ติดต่อเรา</a> <a href="#">เกี่ยวกับเรา</a> </nav> </div> </header> CSS: *{box-sizing:border-box;} .site-header{background:#0b2a6f;color:#fff;} .container{max-width:1100px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;} .nav a{color:#fff;text-decoration:none;margin-left:16px;} .nav a:hover{text-decoration:underline;} จากที่ทำแล้วเห็นผลชัดคือ “จัดวางด้วย flex” จะทำให้โลโก้กับเมนูอยู่คนละฝั่งได้ง่ายมาก และควรใส่ box-sizing:border-box; ไว้ตั้งต้นเพื่อให้คุมขนาด/ระยะ padding ได้ไม่เพี้ยน ถ้าคุณอยากให้ Header ดูเป็นมืออาชีพขึ้นอีกนิด ลองเพิ่ม 2 อย่างนี้: - ทำเมนูให้เป็นปุ่ม/มีสถานะ active ของหน้าปัจจุบัน - ทำให้ responsive: จอเล็กค่อยเปลี่ยนเป็นเมนูแฮมเบอร์เกอร์ (หรืออย่างน้อยให้เมนูขึ้นบรรทัดใหม่ได้) สรุป: ถ้าเข้าใจ “ส่วนประกอบของเว็บไซต์” เป็น Header–Main–Footer แล้วค่อยลงรายละเอียดทีละส่วน จะทำเว็บได้ไวและเป็นระเบียบมากขึ้น โดยเฉพาะ Header ที่เป็นจุดเริ่มนำทางของทั้งเว็บครับ

Related posts

A Sony camera with a lens rests on a grey surface, accompanied by text overlay: "How To Stop IMAGE THEFT as a Content Creator" and "psssst... it's a free app!". The image introduces a guide on preventing image theft.
The image introduces Pixsy, a website for tracking image usage, displaying its logo and explaining its free membership with optional paid features for drafting legal documents and contracts.
The image explains Pixsy's functionality, detailing how it scans the internet for identical matches to uploaded images, noting that it takes a few hours to days to collect initial results.
Stop IMAGE THEFT With This FREE Website! 📸🚨
CALLING ALL CONTENT CREATORS!!! Did you know there's a website that lets you track where your images have been used across the internet? NO? 😮 Okay, well, you're gonna love me. 😍 Let me introduce Pixsy! This FREE website allows you to upload and continuoisly scan your images f
digitally.kate

digitally.kate

936 likes

A hand holds a tablet displaying a lock screen with butterfly wallpaper and the date January 12. Overlay text reads "A WEBSITE Every Student Needs," introducing a study tool for students.
A screenshot of the easynotecards.com homepage shows a search bar for textbooks and trending book covers like "Campbell Biology." Overlay text explains the site generates test questions from textbooks.
A screenshot from easynotecards.com displays flashcard sets for "Campbell Biology," showing options to select chapters and create cards. Overlay text encourages users to choose a section and review flashcards.
A Website EVERY Student Needs!
🌐 Check out my new favorite study website - easynotecards.com – a game-changer for every student's study arsenal! Imagine having a tool that transforms your textbook into a treasure trove of potential exam questions. That's what this website does! 📖 Just type in your textbook details, se
CompSkyy

CompSkyy

9112 likes

A pink notebook with a flower design, illustrating how to get free products from an online retailer, with a price reduction from $24.99 to $0.
A hand with manicured nails typing on a laptop keyboard, with text indicating $143 worth of items were obtained for free by completing short surveys.
Two product boxes, one for liquid laundry detergent travel packets and another for relief soap, illustrating items received for free through a deal website.
I use this SECRET website to get FREE stuff🤭
I used this secret website to get $143 worth of stuff COMPLETELY free! NO Amazon review needed!💰🤑 1️⃣Simply go to the Snagshout website, pick out the item you like and hit “Snag Deal.” 2️⃣Purchase the item and forward the purchase email to the email provided for the item 3️⃣After the item deli
Cindyhackslife

Cindyhackslife

1100 likes

How to Make A Luxury Shopify Website
If you want your Shopify store to feel like a luxury brand… don’t skip these 👇✨ Here’s what actually makes your site look expensive: • Customize your color scheme Default Shopify colors = generic. • Fix your footer (most people forget this) An empty footer makes your store feel unfinishe
McKenna Beverly

McKenna Beverly

74 likes

A monitor displays a data visualization tool, Graphy, showing a line and bar chart. The interface offers customization for colors, themes, and fonts, turning data into beautiful charts. The screen is set on a clean desk with a keyboard and plant.
The image highlights the data visualization tool's interface, focusing on color and theme customization. Options include light/dark modes, various color palettes like Monochrome and Colorful, and chart appearance settings to create stunning visuals from data.
This image shows the data visualization tool's chart type selection panel, offering options such as Column, Bar, Line, Pie, and Heatmap. It also displays settings for bar chart appearance and style, enabling diverse data visualization.
Website to Turn Data into Beautiful Graphs Charts
Spreadsheets can be confusing, but your data doesn’t have to be. With Graphy, you can turn numbers into clear, beautiful charts in just a few clicks.  No complex Excel formulas, no stress, just easy customization and effortless sharing.  Whether it’s for work, school, or personal projects, ma
Reverelia

Reverelia

46 likes

A laptop displays a Google Sheet with a green header, alongside a tablet showing a calendar. The image features text overlay: 'Hack How to create a Notion-like header in Google Sheets'.
A Google Sheet interface demonstrates steps to 'Add 6 Rows' and 'Change Row 1 to height of 300', with a pop-up window for specifying row height to 300 pixels.
A Google Sheet interface shows instructions to 'Change Rows 2-5 to height of 40' and 'Change Row 6 to height of 30', with respective pop-up windows for resizing rows.
Google Sheets Hack - Adding a Notion Like Header
I recently updated my Masterlist with a header! Colors I Used: 1. Dark Green - 0b8043 2. Light Green -ccd5ae Full YT Tutorial is in my profile! #assignments #collegestudent #techfinds #studymotivation #googlesheetscalendar #googlesheets #organization #masterlist
TheHappyPlanner

TheHappyPlanner

315 likes

A narrow, cobbled street in an Italian city with tall, colorful buildings under a bright sky. Text overlay reads "practice ITALIAN online" and "la Dolce Vita," suggesting an immersive language learning experience.
A laptop screen displays the OnlineItalianClub.com website, showing various lesson topics like grammar, listening, dialogues, verbs, and vocabulary, offering thousands of free learning materials.
A laptop screen shows an interactive exercise on OnlineItalianClub.com for matching Italian adjectives to their opposites, demonstrating a way to practice knowledge.
Practice Italian online
If your dream Italian vacay is around the corner, practice with this website! There are six different levels offered on this site, and various different lessons offered that cover the essentials of language learning: reading, writing, listening and writing. I love that the site offers interactive l
Anaïs D’Ottavio

Anaïs D’Ottavio

62 likes

A baby in a high chair wearing a light blue whale bib, with text asking "MAKE $$$$ want to be a MOM INFLUENCER?" and prompting to "sign up for this website".
✨Make Money as a Mom Influencer with this Website🫶
✨How to Make Money as a Mom Influencer✨ I stumbled across this website somehow in the last year and it’s just amazing! 🔗 momselect.com The website looked a little sketchy to me but I signed up for the email list anyway. Now I get TONS of emails about mom influencer opportunities & cam
Modern Mom | Shannon

Modern Mom | Shannon

481 likes

3 Shopify Website Design Fixes For Beginners
Want your Shopify store to look more expensive instantly? Fix this ✨ These are 3 shopify website design fixes. If you’re ready for a full store upgrade, you can get a stunning done-for-you website template from my website listed on my page #websitetips #shopifytutorials #launchanonlinebrand
McKenna Beverly

McKenna Beverly

28 likes

Make a FREE Business Website Using Google
How To Make A Website For FREE Using Google! #businesstips #startinganewbusiness #startinganonlinebusiness #digitalmarketingforbeginners
Inuri

Inuri

31 likes

A close-up of a notebook page with the words "notes header ideas <3" written in a decorative, flowing script font using a red pen, with a red pen resting below.
A notebook page with grid lines showing a creative header design where "TITLE" is written in pink bubble letters and "header" is written in a black script font below it.
A notebook page with grid lines displaying a header design with "title" in a pink, outlined script font and "HEADER" in black block letters below, with a pen visible.
Note header ideas!
If you are looking for some creative ways to bedazzle up your notes, look no further! I absolutely love to glam up my notes in every way possible, and my favorite way to do that is to have a creative header, sub header and title! In this post, I have some of my favorite ways to do that.
essynotes

essynotes

2286 likes

A dark desk setup with a laptop and two monitors displaying code. Overlay text reads "Making Free Money w/ ChatGPT" and "CHECK OUT ALL THE PROMPTS & SITES NEEDED BELOW," introducing a guide on using AI for business.
A desk with a laptop and two monitors showing code and a chat interface. Overlay text instructs to "USE CHATGPT TO CREATE A LEAD-GEN PROMPT FOR PEOPLEGPT - JUICEBOX.AI INSTANTLY PULLING A CLIENT LIST," with the Juicebox logo visible.
A desk with a laptop and two monitors displaying code and a web interface. Overlay text advises to "PASTE THE CLIENT LIST INTO CHATGPT AND ASK WHICH APPS, TOOLS, OR SOLUTIONS WOULD SOLVE THEIR PAIN POINTS," featuring the ChatGPT logo.
Making FREE Money w/ ChatGPT
My AI Money Blueprint: Follow these 3-steps to stay focused and start selling. Check out the steps below. ⤷ Step 1: Find Leads Use PeopleGPT (juicebox.ai) to pull a list of real business owners in your niche. ⤷ Link: https://juicebox.ai/peoplegpt ⤷ Prompt: Create a PeopleGPT search prompt t
Deft Point Consulting

Deft Point Consulting

716 likes

A bullet journal page displays various hand-drawn header ideas for days and dates like 'monday', 'SATURDAY', 'April 8', and 'wed 13 nov'. The designs use different fonts, banners, arrows, and floral accents in purple and blue.
Header Ideas
#bujo #handwriting #headerideas #journalideas #fonts
kaylamhill77

kaylamhill77

1144 likes

7 tabs that make me $3K+/mo as a content creator 💰
As a freelance content creator who does: - Content across my personal social media channels - Brand collabs on my channels - Content in-house for brands (UGC contracts) … and is also in the process of launching a digital community built to connect ambitious students with resources that’ll h
hannah 💟

hannah 💟

95 likes

A digital journal page showcasing various header and title ideas for beginners. It features different handwritten and outlined styles for "Title Here" and "DIGITAL JOURNAL HEADER & TITLE IDEAS" by natashaleecole, with pink watercolor accents on a white background.
A digital journal page displaying various header and title ideas, including "Title Here" in different fonts and styles, bubble letters, and "Journal w/ me". An arrow points to the bubble letters, indicating "EASY WAY TO DO BUBBLE LETTERS".
A digital journal page in dark mode, presenting various header and title ideas. It shows "Title Here" in different styles, bubble letters, and "Journal w/ me" on a black background with purple accents, labeled "DARK MODE".
EASY Beginner Digital Journal Header & Title Ideas
Hi! Here are some easy, beginner digital journal header and title ideas. These can also be used for note taking. I used apple notes to do these header and title ideas as that’s what I’m currently using for digital journaling. You know the trend about what’s in a girls notes app, or never look in a
Natasha Leecole

Natasha Leecole

14 likes

Guys, I made my own website!
I had tried linktree and all the other to try and organize all of my affiliate links into one spot, and it never worked! I either had to pay a lot of money for the access or have millions of followers! I didn’t have the ability to do either of those. I already had a website from when I tried to do
Meghan💙💙

Meghan💙💙

4 likes

Powerful Websites
#fyplemon8 # #fypシ #websites #fy #websiteideas
Tha Smoke Websites

Tha Smoke Websites

238 likes

A laptop screen displays the Canva website with the text "What will you design today?". Overlayed text reads "Canva Tips for Realtors" and "the perfect free font pairings," indicating a guide for real estate agents using Canva.
This image presents a Canva font pairing for realtors, featuring "Playfair Display" for headers, "Open Sauce" for body text, and "Twister" as a script font, displayed on a textured background.
This image showcases another Canva font pairing for real estate agents, with "League Spartan" for headers, "Libre Baskerville" for body text, and "Brittany" as a script font, against a textured background.
The best free Canva fonts for realtors
One of the first big steps as a real estate agent? Building a brand that people remember. A strong, consistent brand helps you stand out, attract the right clients, and build trust fast. But here’s the part that often gets overlooked—your fonts. Yep, the right font combo can instantly commun
Josie | Real Estate Marketing

Josie | Real Estate Marketing

36 likes

A laptop, coffee cup, and glasses are on a desk, with text overlay: "LET'S talk about the importance of the proper website TYPOGRAPHY." The image sets the scene for a discussion on web design.
A white text box over a blurred background of a laptop and coffee cup explains that typography transforms brand energy and asks if fonts look good, read well, and make sense.
This image contrasts good and bad typography examples. The top section shows clean, legible 'Heading' and 'Paragraph' text, while the bottom shows sloppy, illegible versions, highlighting clarity.
The Importance of Proper Typography
One of the biggest chunks of your branding is your font pairings. Choosing the right fonts for your brand isn't just about aesthetics—it's about strategy. Pairing fonts correctly ensures your message is legible to all eyes. Typography can be fun and expressive, but it should also convey the
Kayla Bressler

Kayla Bressler

10 likes

A cream-colored, lined notes page features a faded sunflower watermark and a 'Notes' header. It includes illustrations of a stylish Black woman reading and another standing with a 'girl power' tote. Botanical doodles, coffee cups, and inspirational quotes like 'Dream it. Plan it. Do it.' adorn the page, creating a soft, boho aesthetic.
Chatgbt Prompt (make your own Note pads)
Prompt for note taking page: Create a lined notes page with a cream background and large faded watermark sunflower in the center. Header reads ‘Notes’ in flowing dark green script. Add illustrated poses of a stylish Black woman with glasses — one sitting reading, one standing with a tote bag re
Sunlitlivin☀�️🧚🏼

Sunlitlivin☀️🧚🏼

29 likes

A scenic view of mountains and pine trees under a blue sky, with text 'Spend a double header with me Juco Saturday games' indicating a softball game day.
A book titled 'Daydream' rests on a white ruffled bed, with text 'Wake up Woke up way before my alarm so I laid in bed and read my book for a while'.
A made bed with white bedding and a teddy bear, next to a window, with text 'Got going Around 7:00 I got of bed and got ready Also packed up my stuff'.
Come play a double header with me
This was a Saturday game day and spent my whole day at the field! It was a super fun day and we learned a lot on what we need to work on as a team #Lemon8Diary #dayinmylife #healthylifestyle2024 #softball #collegeathlete
Khiera

Khiera

12 likes

See more