HTML Structure

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

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

<!DOCTYPE html>

a document type declaration that appears at the top of an html file, and tells the browser our file is written in HTML5

2
New cards

<!DOCTYPE html>

<html>

Code goes here

</html>

doctype html doesn’t have a closing tag, but html does

3
New cards

Inside <html>, there should be two elements:

<head> contains all the info for your browser that's not visible on the page.

<body> contains all of the content that you will end up seeing on the page.

4
New cards

The <title> element goes

in the <head> and assigns text to the browser tab.

5
New cards

Attributes

Additional elements to customize an element

6
New cards

Attributes are usually in

name-value pairs like name=”value”

7
New cards

<ol type="a">

<li>Power </li>

<li>Courage 🔥</li>

<li>Wisdom 🦉</li>

</ol>

list will use letter instead of numbers

8
New cards

<ol type="i">

<li>Power </li>

<li>Courage 🔥</li>

<li>Wisdom 🦉</li>

</ol>

list will use roman numerals instead of numbers

9
New cards

class

any element can be assigned multiple class values in the form of a space separated list

10
New cards

example of a class

<p class="first-value second-value third-value">Hello, World</p>

11
New cards

id

Each element can only have one id value with no spaces. Every id value should be unique in the entire page

12
New cards

example of an id

<p id="value">Hello, World</p>

13
New cards

Additionally, id can be used to link to another part of the same page

This can be matched with an <a> anchor element's href attribute via a # hashtag symbol, followed by the identifier used for the id

14
New cards

The values for the class and id attributes must always be

lowercase. If their name is made of multiple words, they should be separated by dashes -.

15
New cards

A good way to remember class vs id is

there can be multiple students in a class, but each student should have an unique id.

16
New cards
17
New cards
18
New cards
19
New cards