{"id":24959575,"url":"https://github.com/arxcode40/html5-js","last_synced_at":"2025-03-28T21:16:34.028Z","repository":{"id":274768417,"uuid":"923407338","full_name":"arxcode40/html5-js","owner":"arxcode40","description":"Generate HTML5 element using JavaScript","archived":false,"fork":false,"pushed_at":"2025-01-29T08:47:05.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T09:38:01.136Z","etag":null,"topics":["html","html5","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arxcode40.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-28T07:21:29.000Z","updated_at":"2025-01-29T08:47:08.000Z","dependencies_parsed_at":"2025-01-29T09:38:05.584Z","dependency_job_id":"47000e4a-4754-4fac-a49a-09f295449cc2","html_url":"https://github.com/arxcode40/html5-js","commit_stats":null,"previous_names":["arxcode40/html5-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fhtml5-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fhtml5-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fhtml5-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arxcode40%2Fhtml5-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arxcode40","download_url":"https://codeload.github.com/arxcode40/html5-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100579,"owners_count":20723479,"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":["html","html5","javascript"],"created_at":"2025-02-03T07:47:31.192Z","updated_at":"2025-03-28T21:16:33.998Z","avatar_url":"https://github.com/arxcode40.png","language":"JavaScript","readme":"# HTML5 JS\n\n## Description\nHelper for generate HTML5 element.\n\n## Syntax\n```javascript\nhtml5(tag = 'doctype', attributes = {}, ...children): string\n```\n\n## Parameters\n#### tag\n\nThe HTML5 tag.\n\n#### attributes\n\nThe HTML5 attributes.\n\n#### children\n\nThe HTML5 children.\n\n## Return Values\nReturn the HTML5 element.\n\n## Examples\n**Example #1: Basic example**\n\n```javascript\nconst html =\nhtml5('div', {'class': 'row'},\n    html5('div', {'class': ['col-sm-8', 'col-md-6']}, '')\n)\n\nconsole.log(html)\n```\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"col-sm-8 col-md-6\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n**Example #2: Doctype declaration**\n```javascript\nconsole.log(html5())\n```\n```html\n\u003c!DOCTYPE html\u003e\n```\n\n**Example #3: Multiple children**\n```javascript\nconst html =\nhtml5('ul', {},\n    html5('li', {}, ''),\n    html5('li', {}, '')\n)\n\nconsole.log(html)\n```\n```html\n\u003cul\u003e\n    \u003cli\u003e\u003c/li\u003e\n    \u003cli\u003e\u003c/li\u003e\n\u003c/ul\u003e\n```\n\n**Example #4: Self-closing tags**\n```javascript\nconst html =\nhtml5('input', {\n    'required': true,\n    'style': {\n        'display': 'block'\n    },\n    'type': 'text'\n})\n\nconsole.log(html)\n```\n```html\n\u003cinput required style=\"display:block;\" type=\"text\"\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farxcode40%2Fhtml5-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farxcode40%2Fhtml5-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farxcode40%2Fhtml5-js/lists"}