HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the head tag holds all of the meta data that is describing the html document.
Where do you put visible content about the HTML document?
Inside the body tags
Also the tag inside the tags shows up in the browser tab.
Where do the head and body tags go in a valid HTML document?
Between the html tags.
What is the purpose of a declaration?
Communicates to the browser about what document type to expect.
Give five examples of HTML element tags.
”< p >< /p >
< h1 >< /h1 > through < h6 > h6 >< em >< / em>< img >”
What is the purpose of HTML attributes?
Attributes provide additional information about an element, and attach further information on the contents of an element.
Ex.
<p>Text Content</p>
“There is an opening tag for the p element with an attribute ‘class’ and its value ‘second paragraph.’
Give an example of an HTML entity (escape character).
HTML entities are to create special characters within html. Ex. & reg; ® ® "There is an html entity reg"
How do block-level elements affect the document flow?
Block-level elements take up the full width and height of a line. They do not allow any other element to share a space with them. 100% theirs. The flow is one element per line.
How do inline elements affect the document flow?
Inline elements can share a space with other elements. Therefore, they have more flow and only take up as much space on the line as needed.
What are the default width and height of a block-level element?
The full width and height of a line.
Ex.
“<div>Hi, I am in-block and I take up the whole ass line. I’m a bully because I do not share.
</div>”
What are the default width and height of an inline element?
Just the needed width of that element.
Ex.
“<p>I am a <span> element</span> and only take up the width of the word ‘element’ in this paragraph,</p>”
What is the difference between an ordered list and an unordered list in HTML?
"Ordered list is numbered. <ol></ol> <h2>Ordered List Example</h2> <ol> <li>Learn to code.</li> <li>Build projects.</li> <li>Get a job.</li> </ol>
Unordered List <ul></ul>
<h2>Unordered List Example</h2> <ul> <li>HTML</li> <li>CSS</li> <li>JS</li> <li>SQL</li> <li>PHP</li> </ul>"
Is an HTML list a block element or an inline element?
Block. They be taking up the whole line.
What HTML tag is used to link to another website?
Anchor tag
< a href=””>< /a>href=”https://disneyland.disney.go.com/”>Disneyland
What is an absolute URL?
An absolute URL links to another website from your document. The href attribute is set to the domain address.
<a>Google</a>
What is a relative URL?
Relative URL link to other pages within the same site, therefore does not need to have the domain name.
“<a> About </a>”
How do you indicate the relative link to a parent directory?
../ signifies going “up a level” into the parent directory
<a></a>
There is a relative URL pointing to the index.html within the parent directory</a>
How do you indicate the relative link to a child directory?
Stating the name of the .html
<a>
There is a relative URL pointing to the index.html
</a>
How do you indicate the relative link to a grand parent directory?
../../index.html
Going up two levels.
<a></a>
There is a relative URL pointing to the index.html within the parent directory within that parent directory
</a>
How do you indicate the relative link to the same directory?
Stating the name of the file name, uncommon syntax would have a “./index.html”