{"id":21489527,"url":"https://github.com/s44wn/html-cheatsheet","last_synced_at":"2026-03-19T20:36:28.388Z","repository":{"id":164794542,"uuid":"546113533","full_name":"S44WN/html-cheatsheet","owner":"S44WN","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-05T14:50:41.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T20:22:33.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/S44WN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-05T14:47:46.000Z","updated_at":"2022-10-08T08:03:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"6072efcd-d3de-4bb2-a949-c5195ef943a7","html_url":"https://github.com/S44WN/html-cheatsheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S44WN%2Fhtml-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S44WN%2Fhtml-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S44WN%2Fhtml-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S44WN%2Fhtml-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/S44WN","download_url":"https://codeload.github.com/S44WN/html-cheatsheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244020895,"owners_count":20385035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T14:21:27.562Z","updated_at":"2026-01-04T04:39:58.316Z","avatar_url":"https://github.com/S44WN.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ccenter\u003e 🧑‍💻 HTML-CHEATSHEET 🌐 \u003c/center\u003e\n\n## Base elements -\n\nThe HTML elements that allow you to build the most basic web page\n\n\u003cbr\u003e\n\n## html\n\nDefines the root element of an HTML document. All other elements must be contained within this root element.\n\n\u003cbr\u003e\n\n## head\n\nDefines a container for a web page's metadata.\n\n\u003cbr\u003e\n\n## body\n\nThe container for a web page's content. Must be a direct child of `\u003chtml\u003e`, and must be an ancestor of all HTML elements (except where noted).\n\n\u003cbr\u003e\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003c!-- Document metadata --\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003c!-- Document content --\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003chr\u003e\n\u003cbr\u003e\n\n## link\n\nDefines a link between the current web page and an external link or resource.\n\n```html\n\u003clink\n  rel=\"stylesheet\"\n  type=\"text/css\"\n  href=\"https://htmlreference.io/css/website.css\"\n/\u003e\n```\n\nDescription :\n\n### `href`\n\nDefines the URL of the link.\n\n- = `\"https://htmlreference.io/css/website.css\"`\n  - You can pass an absolute URL like above.\n- = `href=\"/css/website.css\"`\n  - You can pass a URL relative to the root\n\n\u003cbr\u003e\n\n### `rel`\n\nDefines a link type, explaining how the link relates to the current web page.\n\n- = `\"stylesheet\"`\n  - The link is a stylesheet.\n- = `\"icon\"`\n  - The link is a favicon.\n- = `\"author\"`\n  - The link is the web page's author website.\n- = `\"next\"`\n  - The link is the next page.\n\n\u003cbr\u003e\n\n### `type`\n\nDefines the type of the linked resource.\n\n- = `\"text/css\"`\n  - The link is a CSS file.\n- = `\"text/html\"`\n  - The link is an HTML document.\n\n\u003chr\u003e\n\u003cbr\u003e\n\n## meta\n\nDefines metadata attached to a web page.\n\n```html\n\u003cmeta charset=\"UTF-8\" /\u003e\n\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" /\u003e\n\u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n\u003cmeta name=\"theme-color\" content=\"#ffffff\" /\u003e\n```\n\n```html\n\u003c!-- Refresh the page every 5 seconds --\u003e\n\u003cmeta http-equiv=\"refresh\" content=\"5\" /\u003e\n```\n\n```html\n\u003c!-- Redirect instantly to https://saawn.dev --\u003e\n\u003cmeta http-equiv=\"refresh\" content=\"0; url=https://saawn.dev\" /\u003e\n```\n\n### `charset`\n\nDefines the character encoding for the whole web page.\n\n- = `\"UTF-8\"`\n  - The value must be a valid [character set.](https://www.iana.org/assignments/character-sets/character-sets.xhtml)\n\n### `http-equiv`\n\nDefines meta rules for the web page.\n\n- = `\"Content-Security-Policy\"`\n  - Defines a link to a web page's content policies.\n- = `\"refresh\"`\n  - Allows to refresh the web page every N seconds, or even redirect to another URL.\n- = `\"X-UA-Compatible\"`\n  - Defines which Internet Explorer verison the web page should be rendered as.\n\n### `name`\n\nDefines additional information attached to the web page.\n\n- = `\"viewport\"`\n  - Defines dimension and scaling rules for the viewport.\n- = `\"theme-color\"`\n  - Defines a theme color which can be used by the browser or the operating system.\n\n### `content`\n\nDefines the content of the metadata. This varies according to the name or http-equiv value.\n\n- = `\"width=device-width, initial-scale=1\"`\n  - For the viewport metadata, you can specify the width and initial scale of the web page.\n- = `\"2; url=https://saawn.dev\"`\n  - For the refresh metadata, you can specify how many seconds to wait before redirecting to another URL.\n\n\u003chr\u003e\n\u003cbr\u003e\n\n## script\n\nDefines a container for an external script.\n\n```html\n\u003cscript src=\"https://htmlreference.io/javascript/my-scripts.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\n  console.log(\"Hello World\");\n\u003c/script\u003e\n```\n\n### `src`\n\nDefines the source of the external script.\n\n- = `src=\"/javascript/my-scripts.js\"`\n  - The URL can be relative or absolute\n\n### `type`\n\nDefines the [MIME](https://www.iana.org/assignments/media-types/media-types.xhtml) type of the external script.\n\n- = `type=\"text/javascript\"`\n  - This is for `.js` files.\n\n### `async`\n\nAllows the external script to be loaded asynchronously.\nNo value required.\n\n\u003chr\u003e\n\u003cbr\u003e\n\n### more coming soon...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs44wn%2Fhtml-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs44wn%2Fhtml-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs44wn%2Fhtml-cheatsheet/lists"}