[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"topic:html-colors-names-hex-rgb-hsl":6,"course-tree":85,"blog-categories":353},{"data":4},{"google_site_verification":5,"ga4_measurement_id":5,"site_name":5,"default_og_image":5,"twitter_handle":5},null,{"data":7},{"id":8,"title":9,"slug":10,"content":11,"course":12,"subcategory":15,"author":18,"reading_time_minutes":24,"cornerstone":25,"schema_type":26,"faq_json":5,"video_url":5,"canonical_url":27,"meta_title":28,"meta_description":29,"og_image":5,"toc_json":30,"code_examples":58,"quiz":5,"exercises":67,"published_at":5,"updated_at":76,"prev":77,"next":81},13,"HTML Colors (Names, HEX, RGB, HSL)","html-colors-names-hex-rgb-hsl","\u003Ch2 id=\"html-colors-names-hex-rgb-hsl\">HTML Colors (Names, HEX, RGB, HSL)\u003C\u002Fh2>\u003Cp>\u003Cstrong>HTML colors\u003C\u002Fstrong> can be defined in several different formats, and knowing when to use each one is an essential modern front-end development skill &mdash; especially when working with transparency, design systems, and dynamic theming.\u003C\u002Fp>\u003Ch3 id=\"1-named-colors\">1. Named Colors\u003C\u002Fh3>\u003Cp>HTML supports 140 predefined \u003Cstrong>color names\u003C\u002Fstrong> like \u003Ccode>red\u003C\u002Fcode>, \u003Ccode>blue\u003C\u002Fcode>, \u003Ccode>tomato\u003C\u002Fcode>, and \u003Ccode>rebeccapurple\u003C\u002Fcode>:\u003C\u002Fp>\u003Cpre>\u003Ccode>&lt;p style=\"color: tomato;\"&gt;This text is tomato colored.&lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch3 id=\"2-hex-color-codes\">2. HEX Color Codes\u003C\u002Fh3>\u003Cp>\u003Cstrong>HEX codes\u003C\u002Fstrong> represent colors using a 6-digit hexadecimal value prefixed with \u003Ccode>#\u003C\u002Fcode>, combining red, green, and blue values:\u003C\u002Fp>\u003Cpre>\u003Ccode>&lt;p style=\"color: #ff6347;\"&gt;Tomato in HEX&lt;\u002Fp&gt;\n&lt;p style=\"color: #000000;\"&gt;Black&lt;\u002Fp&gt;\n&lt;p style=\"color: #ffffff;\"&gt;White&lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch3 id=\"3-rgb-and-rgba\">3. RGB and RGBA\u003C\u002Fh3>\u003Cp>\u003Cstrong>RGB\u003C\u002Fstrong> defines colors using Red, Green, and Blue values from 0&ndash;255. \u003Cstrong>RGBA\u003C\u002Fstrong> adds an Alpha channel for transparency (0 = fully transparent, 1 = fully opaque):\u003C\u002Fp>\u003Cpre>\u003Ccode>&lt;p style=\"color: rgb(255, 99, 71);\"&gt;RGB Tomato&lt;\u002Fp&gt;\n&lt;p style=\"background-color: rgba(255, 0, 0, 0.5);\"&gt;50% transparent red background&lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch3 id=\"4-hsl-and-hsla-trending-in-modern-design-systems\">4. HSL and HSLA (Trending in Modern Design Systems)\u003C\u002Fh3>\u003Cp>\u003Cstrong>HSL\u003C\u002Fstrong> (Hue, Saturation, Lightness) is increasingly popular among modern designers because it's far more intuitive for creating color palettes and variations &mdash; you can adjust lightness or saturation without recalculating RGB values:\u003C\u002Fp>\u003Cpre>\u003Ccode>&lt;p style=\"color: hsl(9, 100%, 64%);\"&gt;HSL Tomato&lt;\u002Fp&gt;\n&lt;p style=\"background-color: hsla(9, 100%, 64%, 0.3);\"&gt;30% transparent HSL background&lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch3 id=\"choosing-the-right-color-format\">Choosing the Right Color Format\u003C\u002Fh3>\u003Cul>\u003Cli>Use \u003Cstrong>named colors\u003C\u002Fstrong> for quick prototyping and simple demos.\u003C\u002Fli>\u003Cli>Use \u003Cstrong>HEX\u003C\u002Fstrong> for design handoffs, since most design tools (Figma, Adobe XD) export HEX values by default.\u003C\u002Fli>\u003Cli>Use \u003Cstrong>RGBA\u003C\u002Fstrong> or \u003Cstrong>HSLA\u003C\u002Fstrong> whenever you need transparency\u002Fopacity control.\u003C\u002Fli>\u003Cli>Use \u003Cstrong>HSL\u003C\u002Fstrong> when building a scalable design system or color palette, since it's easier to reason about lightness and saturation.\u003C\u002Fli>\u003C\u002Ful>\u003Ch3 id=\"key-takeaways\">Key Takeaways\u003C\u002Fh3>\u003Cul>\u003Cli>HTML supports named colors, HEX, RGB\u002FRGBA, and HSL\u002FHSLA formats.\u003C\u002Fli>\u003Cli>RGBA and HSLA add an alpha channel for transparency.\u003C\u002Fli>\u003Cli>HSL is preferred in modern design systems for intuitive color adjustments.\u003C\u002Fli>\u003Cli>HEX remains the most common format handed off from design tools.\u003C\u002Fli>\u003C\u002Ful>\u003Cdiv class=\"try-it-yourself language-html\">\u003Cpre>\u003Ccode>&lt;p style='color: red;'&gt;Named color&lt;\u002Fp&gt;\n&lt;p style='color: #3498db;'&gt;HEX color&lt;\u002Fp&gt;\n&lt;p style='color: rgb(46, 204, 113);'&gt;RGB color&lt;\u002Fp&gt;\n&lt;p style='color: hsl(280, 60%, 55%);'&gt;HSL color&lt;\u002Fp&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003Cdiv class=\"try-it-yourself language-html\">\u003Cpre>\u003Ccode>&lt;div style='background-color: rgba(0, 123, 255, 0.2); padding: 20px; border: 2px solid rgb(0, 123, 255);'&gt;\n  A semi-transparent blue box using RGBA.\n&lt;\u002Fdiv&gt;\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>",{"name":13,"slug":14},"HTML","html-tutorial",{"name":16,"slug":17},"Text & Content Basics","text-content-basics",{"slug":19,"display_name":20,"job_title":5,"short_bio":5,"expertise_tags":21,"headshot":5,"long_bio":5,"credentials":5,"twitter_url":5,"linkedin_url":5,"github_url":5,"personal_website_url":5,"other_sameas_urls":5,"topics":22,"posts":23},"badar-khalil","Badar Khalil",[],[],[],2,false,"Article","https:\u002F\u002Fwpfsharp.com\u002Ftopics\u002Fhtml-colors-names-hex-rgb-hsl","HTML Colors Explained: Names, HEX, RGB & HSL","Learn every HTML color format including named colors, HEX codes, RGB, RGBA, HSL, and HSLA, with practical code examples and modern best practices.",[31],{"id":10,"text":9,"level":24,"children":32},[33,38,42,46,50,54],{"id":34,"text":35,"level":36,"children":37},"1-named-colors","1. Named Colors",3,[],{"id":39,"text":40,"level":36,"children":41},"2-hex-color-codes","2. HEX Color Codes",[],{"id":43,"text":44,"level":36,"children":45},"3-rgb-and-rgba","3. RGB and RGBA",[],{"id":47,"text":48,"level":36,"children":49},"4-hsl-and-hsla-trending-in-modern-design-systems","4. HSL and HSLA (Trending in Modern Design Systems)",[],{"id":51,"text":52,"level":36,"children":53},"choosing-the-right-color-format","Choosing the Right Color Format",[],{"id":55,"text":56,"level":36,"children":57},"key-takeaways","Key Takeaways",[],[59,64],{"id":60,"language":61,"code":62,"is_editable":63},26,"html","\u003Cp style='color: red;'>Named color\u003C\u002Fp>\n\u003Cp style='color: #3498db;'>HEX color\u003C\u002Fp>\n\u003Cp style='color: rgb(46, 204, 113);'>RGB color\u003C\u002Fp>\n\u003Cp style='color: hsl(280, 60%, 55%);'>HSL color\u003C\u002Fp>",true,{"id":65,"language":61,"code":66,"is_editable":63},27,"\u003Cdiv style='background-color: rgba(0, 123, 255, 0.2); padding: 20px; border: 2px solid rgb(0, 123, 255);'>\n  A semi-transparent blue box using RGBA.\n\u003C\u002Fdiv>",[68],{"id":69,"title":70,"slug":71,"prompt":72,"starter_code":73,"expected_output":74,"language":61,"order_index":75},11,"Convert Between Color Formats","convert-color-formats","Style three paragraphs so the first uses a named color 'gold', the second uses the HEX equivalent of gold (#FFD700), and the third uses an RGB equivalent (255, 215, 0).","\u003Cp>Named color paragraph\u003C\u002Fp>\n\u003Cp>HEX color paragraph\u003C\u002Fp>\n\u003Cp>RGB color paragraph\u003C\u002Fp>","",1,"2026-09-27T16:55:38+00:00",{"id":78,"slug":79,"title":80},12,"html-comments-best-practices","HTML Comments (Best Practices)",{"id":82,"slug":83,"title":84},14,"html-css-integration-inline-internal-external","HTML & CSS Integration (Inline, Internal, External)",{"data":86},[87],{"id":75,"name":13,"slug":14,"icon":5,"icon_url":5,"short_description":88,"meta_title":89,"meta_description":90,"og_image":91,"locale":92,"subcategories":93},"Welcome to our HTML Tutorial for Beginners, a complete guide designed to help you learn HTML from the ground up.\n\nHTML, which stands for HyperText Markup Language, is the standard language used to structure content on the web. Whether you want to become a web developer, build your own website, or continue learning CSS and JavaScript, understanding HTML is an essential first step.\n\nThis HTML course takes you through the fundamentals step by step, using simple explanations and practical examples. ","HTML Tutorial for Beginners - Learn HTML Step by Step","Learn HTML from scratch with our beginner-friendly HTML tutorial. Understand HTML tags, elements, forms, tables, links, images, semantic HTML and more with practical examples.","https:\u002F\u002Fwpfsharp.com\u002Fstorage\u002Fcourses\u002Fog\u002F01M2GK0XN45C0B937NF9XFAD4S.webp","en",[94,119,143,167,225,259,273,301,325,341],{"id":75,"name":95,"slug":96,"order_index":75,"topics":97},"HTML Fundamentals & Setup","html-fundamentals-setup",[98,101,104,107,111,115],{"id":24,"title":99,"slug":100,"order_index":75,"cornerstone":25,"reading_time_minutes":24},"HTML Editors & Environment Setup","html-editors-and-environment-setup",{"id":75,"title":102,"slug":103,"order_index":75,"cornerstone":25,"reading_time_minutes":75},"HTML Introduction & History","html-introduction-and-history",{"id":36,"title":105,"slug":106,"order_index":36,"cornerstone":25,"reading_time_minutes":24},"HTML Basic Syntax & Document Structure","html-basic-syntax-document-structure",{"id":108,"title":109,"slug":110,"order_index":108,"cornerstone":25,"reading_time_minutes":24},4,"HTML Elements & Tags Explained","html-elements-tags-explained",{"id":112,"title":113,"slug":114,"order_index":112,"cornerstone":25,"reading_time_minutes":24},5,"HTML Attributes (Global & Standard)","html-attributes-global-standard",{"id":116,"title":117,"slug":118,"order_index":116,"cornerstone":25,"reading_time_minutes":24},6,"Understanding the DOCTYPE & HTML5 Boilerplate","understanding-doctype-html5-boilerplate",{"id":24,"name":16,"slug":17,"order_index":24,"topics":120},[121,125,129,133,137,140,141,142],{"id":122,"title":123,"slug":124,"order_index":122,"cornerstone":25,"reading_time_minutes":24},7,"HTML Headings (H1–H6) & SEO Best Practices","html-headings-h1-h6-seo-best-practices",{"id":126,"title":127,"slug":128,"order_index":126,"cornerstone":25,"reading_time_minutes":24},8,"HTML Paragraphs & Line Breaks","html-paragraphs-line-breaks",{"id":130,"title":131,"slug":132,"order_index":130,"cornerstone":25,"reading_time_minutes":75},9,"HTML Text Formatting (Bold, Italic, Mark, etc.)","html-text-formatting-bold-italic-mark",{"id":134,"title":135,"slug":136,"order_index":134,"cornerstone":25,"reading_time_minutes":24},10,"HTML Styles (Inline CSS Basics)","html-styles-inline-css-basics",{"id":69,"title":138,"slug":139,"order_index":69,"cornerstone":25,"reading_time_minutes":24},"HTML Quotations & Citations (blockquote, q, cite)","html-quotations-citations-blockquote-q-cite",{"id":78,"title":80,"slug":79,"order_index":78,"cornerstone":25,"reading_time_minutes":24},{"id":8,"title":9,"slug":10,"order_index":8,"cornerstone":25,"reading_time_minutes":24},{"id":82,"title":84,"slug":83,"order_index":82,"cornerstone":25,"reading_time_minutes":24},{"id":36,"name":144,"slug":145,"order_index":36,"topics":146},"Links, Media & Navigation","links-media-navigation",[147,151,155,159,163],{"id":148,"title":149,"slug":150,"order_index":148,"cornerstone":25,"reading_time_minutes":24},15,"HTML Links (Anchor Tags & Hyperlinks)","html-links-anchor-tags-hyperlinks",{"id":152,"title":153,"slug":154,"order_index":152,"cornerstone":25,"reading_time_minutes":24},16,"HTML Images (Alt Text, Lazy Loading, Formats)","html-images-alt-text-lazy-loading-formats",{"id":156,"title":157,"slug":158,"order_index":156,"cornerstone":25,"reading_time_minutes":75},17,"HTML Favicon Setup","html-favicon-setup",{"id":160,"title":161,"slug":162,"order_index":160,"cornerstone":25,"reading_time_minutes":24},18,"HTML Page Title & Meta Tags (SEO Essentials)","html-page-title-meta-tags-seo-essentials",{"id":164,"title":165,"slug":166,"order_index":164,"cornerstone":25,"reading_time_minutes":24},19,"HTML File Paths (Absolute vs Relative)","html-file-paths-absolute-vs-relative",{"id":108,"name":168,"slug":169,"order_index":108,"topics":170},"Structuring Content","structuring-content",[171,176,181,185,189,193,197,201,205,209,213,217,221],{"id":172,"title":173,"slug":174,"order_index":175,"cornerstone":25,"reading_time_minutes":24},24,"HTML Tables Explained: Rows, Columns & Merging Cells","html-tables-rows-columns-merging-cells",20,{"id":177,"title":178,"slug":179,"order_index":180,"cornerstone":25,"reading_time_minutes":24},25,"HTML Lists: Ordered, Unordered & Description Lists","html-lists-ordered-unordered-description",21,{"id":60,"title":182,"slug":183,"order_index":184,"cornerstone":25,"reading_time_minutes":24},"HTML Block vs Inline Elements Explained","html-block-vs-inline-elements",22,{"id":65,"title":186,"slug":187,"order_index":188,"cornerstone":25,"reading_time_minutes":75},"HTML Div & Span: Generic Containers Explained","html-div-and-span-containers",23,{"id":190,"title":191,"slug":192,"order_index":172,"cornerstone":25,"reading_time_minutes":24},28,"HTML Classes vs ID: Selectors Explained","html-classes-vs-id-selectors-explained",{"id":194,"title":195,"slug":196,"order_index":177,"cornerstone":25,"reading_time_minutes":75},29,"HTML Iframes: Embedding External Content","html-iframes-embedding-content",{"id":198,"title":199,"slug":200,"order_index":60,"cornerstone":25,"reading_time_minutes":24},30,"HTML Head Element Deep Dive","html-head-element-deep-dive",{"id":202,"title":203,"slug":204,"order_index":65,"cornerstone":25,"reading_time_minutes":24},31,"HTML Layout Techniques: Header, Nav & Footer","html-layout-techniques-header-nav-footer",{"id":206,"title":207,"slug":208,"order_index":190,"cornerstone":25,"reading_time_minutes":24},32,"Responsive HTML Design: Mobile-First Approach","responsive-html-design-mobile-first-approach",{"id":210,"title":211,"slug":212,"order_index":210,"cornerstone":25,"reading_time_minutes":75},33,"HTML Emojis 😀: How to Use Them in Web Pages","html-emojis-trending-guide",{"id":214,"title":215,"slug":216,"order_index":214,"cornerstone":25,"reading_time_minutes":24},34,"HTML Character Sets: UTF-8 & Encoding Explained","html-character-sets-utf-8-encoding",{"id":218,"title":219,"slug":220,"order_index":218,"cornerstone":25,"reading_time_minutes":75},35,"HTML URL Encoding Explained","html-url-encoding-explained",{"id":222,"title":223,"slug":224,"order_index":222,"cornerstone":25,"reading_time_minutes":75},36,"HTML vs XHTML: Key Differences","html-vs-xhtml-key-differences",{"id":122,"name":226,"slug":227,"order_index":112,"topics":228},"Forms & User Input","forms-user-input",[229,234,239,244,249,254],{"id":230,"title":231,"slug":232,"order_index":233,"cornerstone":25,"reading_time_minutes":24},49,"HTML Forms Introduction","html-forms-introduction",37,{"id":235,"title":236,"slug":237,"order_index":238,"cornerstone":25,"reading_time_minutes":75},50,"HTML Form Attributes (action, method, etc.)","html-form-attributes-action-method",38,{"id":240,"title":241,"slug":242,"order_index":243,"cornerstone":25,"reading_time_minutes":75},51,"HTML Form Elements (input, select, textarea, button)","html-form-elements-input-select-textarea-button",39,{"id":245,"title":246,"slug":247,"order_index":248,"cornerstone":25,"reading_time_minutes":24},52,"HTML Input Types (Modern Types: email, date, color, range)","html-input-types-modern-email-date-color-range",40,{"id":250,"title":251,"slug":252,"order_index":253,"cornerstone":25,"reading_time_minutes":24},53,"HTML Input Attributes (required, placeholder, pattern)","html-input-attributes-required-placeholder-pattern",41,{"id":255,"title":256,"slug":257,"order_index":258,"cornerstone":25,"reading_time_minutes":24},54,"HTML Form Validation (Client-Side)","html-form-validation-client-side",42,{"id":126,"name":260,"slug":261,"order_index":116,"topics":262},"Graphics & Visuals","graphics-visuals",[263,268],{"id":264,"title":265,"slug":266,"order_index":267,"cornerstone":25,"reading_time_minutes":36},55,"HTML Canvas (2D Drawing API) 🔥","html-canvas-2d-drawing-api",43,{"id":269,"title":270,"slug":271,"order_index":272,"cornerstone":25,"reading_time_minutes":36},56,"HTML SVG (Scalable Vector Graphics)","html-svg-scalable-vector-graphics",44,{"id":130,"name":274,"slug":275,"order_index":122,"topics":276},"Multimedia","multimedia",[277,282,287,292,297],{"id":278,"title":279,"slug":280,"order_index":281,"cornerstone":25,"reading_time_minutes":24},57,"HTML Media Overview","html-media-overview",45,{"id":283,"title":284,"slug":285,"order_index":286,"cornerstone":25,"reading_time_minutes":24},58,"HTML Video Embedding (Native Player)","html-video-embedding-native-player",46,{"id":288,"title":289,"slug":290,"order_index":291,"cornerstone":25,"reading_time_minutes":24},59,"HTML Audio Embedding","html-audio-embedding",47,{"id":293,"title":294,"slug":295,"order_index":296,"cornerstone":25,"reading_time_minutes":24},60,"HTML Plug-ins (Object & Embed Tags)","html-plugins-object-embed-tags",48,{"id":298,"title":299,"slug":300,"order_index":230,"cornerstone":25,"reading_time_minutes":24},61,"Embedding YouTube Videos in HTML","embedding-youtube-videos-in-html",{"id":134,"name":302,"slug":303,"order_index":126,"topics":304},"HTML5 Web APIs (Advanced\u002FTrending)","html5-web-apis-advancedtrending",[305,309,313,317,321],{"id":306,"title":307,"slug":308,"order_index":235,"cornerstone":25,"reading_time_minutes":24},62,"HTML Geolocation API","html-geolocation-api",{"id":310,"title":311,"slug":312,"order_index":240,"cornerstone":25,"reading_time_minutes":24},63,"HTML Drag & Drop API","html-drag-and-drop-api",{"id":314,"title":315,"slug":316,"order_index":245,"cornerstone":25,"reading_time_minutes":24},64,"HTML Web Storage (localStorage & sessionStorage)","html-web-storage-localstorage-sessionstorage",{"id":318,"title":319,"slug":320,"order_index":250,"cornerstone":25,"reading_time_minutes":24},65,"HTML Web Workers (Background Processing)","html-web-workers-background-processing",{"id":322,"title":323,"slug":324,"order_index":255,"cornerstone":25,"reading_time_minutes":24},66,"HTML Server-Sent Events (SSE)","html-server-sent-events-sse",{"id":69,"name":326,"slug":327,"order_index":130,"topics":328},"Accessibility & Best Practices (High-Demand  Skill) �","accessibility-best-practices-high-demand-skill",[329,333,337],{"id":330,"title":331,"slug":332,"order_index":264,"cornerstone":25,"reading_time_minutes":24},67,"HTML Accessibility (ARIA, Screen Readers)","html-accessibility-aria-screen-readers",{"id":334,"title":335,"slug":336,"order_index":269,"cornerstone":25,"reading_time_minutes":24},68,"Writing Semantic & SEO-Friendly HTML","writing-semantic-and-seo-friendly-html",{"id":338,"title":339,"slug":340,"order_index":278,"cornerstone":25,"reading_time_minutes":24},69,"HTML Performance Optimization Basics","html-performance-optimization-basics",{"id":78,"name":342,"slug":343,"order_index":134,"topics":344},"Reference & Practice","reference-practice",[345,349],{"id":346,"title":347,"slug":348,"order_index":75,"cornerstone":25,"reading_time_minutes":24},70,"HTML Tag List (Full Reference)","html-tag-list-full-reference",{"id":350,"title":351,"slug":352,"order_index":24,"cornerstone":25,"reading_time_minutes":24},71,"HTML Global Attributes Reference","html-global-attributes-reference",{"data":354},[355,360,363,368,373],{"name":356,"slug":357,"description":358,"post_count":24,"subcategories":359},"CSS","css","Learn CSS with practical tutorials and examples covering layouts, Flexbox, Grid, responsive design, typography, positioning, animations, and more.",[],{"name":13,"slug":61,"description":361,"post_count":24,"subcategories":362},"Learn HTML with practical tutorials and examples for beginners. Explore HTML tags, elements, attributes, links, images, forms, semantic HTML, and more with clear explanations and real code examples.",[],{"name":364,"slug":365,"description":366,"post_count":75,"subcategories":367},"WPF","wpf","Learn WPF with practical tutorials and examples covering XAML, windows, controls, layouts, data binding, MVVM, commands, styles, templates, debugging, and modern WPF UI development.",[],{"name":369,"slug":370,"description":371,"post_count":75,"subcategories":372},"Python","python","Learn Python with practical tutorials covering strings, lists, functions, exceptions, files, packages, virtual environments, modules, classes, and beginner programming concepts.",[],{"name":374,"slug":375,"description":376,"post_count":75,"subcategories":377},"Java","java","Learn Java with practical tutorials and examples for beginners. Explore Java syntax, variables, data types, classes, objects, methods, inheritance, exceptions, collections, and more with clear explanations and real code examples.",[]]