HTML Basics and Semantic Markup (Video Notes)

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Flashcards cover HTML structure, closing/nesting rules, cross-browser considerations, semantic markup (main, section), lists, attributes, accessibility, comments, and basic VS Code tips.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

What's the difference between empty and non-empty HTML elements?

Empty elements (e.g., <br/>) do not have a closing tag; non-empty elements (e.g., <p>Text</p>) have content and require both opening and closing tags.

2
New cards

What's the correct closing tag for a paragraph?

It's </p>.

3
New cards

Why is proper nesting of HTML tags important?

To maintain correct document structure; inner tags must close before outer ones, similar to nesting dolls.

4
New cards

What is cross-browser compatibility?

Ensuring web content looks and functions similarly across various browsers and devices.

5
New cards

Which HTML element holds the primary content of a page?

The main element.

6
New cards

Ordered vs. unordered lists: what's the difference?

Ordered lists (<ol>) are numbered; unordered lists (<ul>) are bulleted and imply no specific order.

7
New cards

What is the id attribute used for in HTML?

To give an element a unique identifier for CSS styling or direct linking (anchors).

8
New cards

What's the semantic role of the <section> element?

To group related, standalone content into a meaningful section.

9
New cards

How do you add comments in HTML and CSS?

HTML: <!-- comment -->; CSS: /* comment */.

10
New cards

How do you view a web page's source code?

Windows: Ctrl+U; macOS: Command+Option+U.

11
New cards

How does semantic markup benefit screen readers for accessibility?

It helps screen readers convey meaning by using elements like main, section, h1-h6, strong, and em correctly.

12
New cards

What is the purpose of the main HTML element?

To denote the document's primary content, most relevant to the page.

13
New cards

VS Code (macOS): shortcut for word wrap?

Option+Z.

14
New cards

Can HTML elements have attributes and values? Give an example.

Yes. Example: <div id="content" class="main">Content</div>.