GitHub Pages and Semantic HTML (8-31-2026) | CIS311
Overview
Kenan Casey demonstrates deploying a static HTML and CSS site with GitHub Pages, explaining how Git commits, pushes, and the main branch connect local work to a hosted site. He then teaches semantic HTML choices for landmarks, headings, links, buttons, dialogs, and data tables, and assigns a div-to-semantic-HTML conversion exercise.
Key takeaways
- A Git commit records a snapshot locally, while pushing to origin uploads that commit so GitHub Pages can deploy it.
- A GitHub Pages project site can be published from the main branch and repository root at username.github.io/repository-name.
- Choose semantic HTML based on a component's meaning: use section for thematic groupings, article for standalone content, and div for generic layout grouping.
- Use links for navigation and buttons for actions; assistive technologies such as screen readers communicate those roles differently.
- Use HTML tables for genuine two-dimensional data, structuring them with table, thead, tbody, tr, th, and td rather than layout-only div grids.
- Heading levels represent document hierarchy, not visual styling; the lesson recommends one h1 per page and styling headings with CSS.
Chapters
- Creates a public repository from scratch and clones it locally using GitHub Desktop.
- Explains Git commits as snapshots in a repository, which can be used to restore earlier code or coordinate work through branches and merges.
- Adds an index.html file and a README.md; GitHub renders Markdown headings and lists as formatted project documentation.
- Commits the new page locally with a message describing the change.
- Pushes the local commit to the remote repository named origin, distinguishing a local commit from uploading it to GitHub.
- Enables GitHub Pages in repository settings by deploying the main branch from the repository root.
- Uses the GitHub Pages URL pattern of username.github.io/repository-name for a project site.
- Adds styles.css, links it from index.html, then commits and pushes the update; deployment may take a short time to appear.
- Recommends choosing a semantic element when a component has a clear purpose, such as header, main, footer, nav, section, or aside.
- Uses section for a thematic grouping, typically with a heading, and article for content that can stand alone, such as a blog post or news item.
- Reserves div for generic grouping needed for layout, styling, or scripting when no meaningful content role applies.
- Advises one h1 per page with subordinate headings organized hierarchically, and says heading levels should reflect structure rather than visual size.
- Uses anchor elements for navigation to another location and button elements for actions performed on the page.
- Notes that a menu control and a close control should be buttons even if links could be styled to look similar.
- Explains that semantic choices help screen readers distinguish navigation from actions and improve accessibility.
- Introduces the dialog element for modal or nonmodal dialogs instead of using a generic div solely to create a dialog.
- Uses an HTML table for two-dimensional data arranged in rows and columns, rather than nesting div elements to imitate a grid.
- Structures the example with table, thead, tbody, tr, and th elements for column headings.
- Adds schedule data with td cells, including days, office-hour times, and a location.
- Applies CSS borders and a 100% table width to style the schedule without changing its semantic structure.
- Assigns a single-page site built entirely from div elements and asks students to replace them with appropriate semantic HTML.
- Encourages students to identify clear replacements such as a div class="header" becoming a header element.
- Invites styling improvements while keeping the main focus on selecting elements that match each component's purpose.
Transcript excerpt
0:01 I'd like to go through how to deploy a website to GitHub pages again. Um, well, I guess I'll do it really quick, but maybe my commentary will be different depending on how many people um had issues deploying to GitHub pages. Okay. Okay. So, everybody else like how many people successfully deployed to a GitHub page? Okay. Okay. >> Yeah. Do help us out. Give us give us the link to your page. Um so we can just jump right to it. If you just send us the page
0:58 to me, if you put if all I have to switch is a SL a slashflex to a slashg grid on the end, um I can handle that. I get how you can if you submit a link on Canvas, you can only submit one. Is that right? I guess I could have given you a text box, but I'll figure that out. Um so I'm going to call this I'm going to just start fully from scratch. Um, I don't know. Let me call it. What do we want to make a website about? Um, uh, what are we into? What happened recently? That's good. Social clubs. Uh, it's going to be public. I
1:50 It is good practice to have a readme with a project which is a file that explains what your project is about. When we downloaded and started from a front-end mentor site, they gave us a really nice read me. So, I'm starting blank just so that I can put a few bits of text in and then make this happen. So, I'm gonna come over here to code and I'm gonna open this with GitHub desktop to clone this site. So, that means that I'm going to make a full copy of the GitHub repository for this site.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Kenan Casey.