HTML Basics Flashcards
What is the role of HTML?
HTML represents the content and structure of the web page.
What is an HTML Element?
HTML Elements are the building blocks for an HTML document. They represent headings, paragraphs, links, images and more. Most HTML elements consist of an opening tag <elementName> and a closing tage </elementName>.
What is the basic syntax for an HTML Element?
<elementName>Content goes here</elementName>
What is a Void Element?
Void Elements cannot have any content and only have a start tag.
What are some examples of Void Elements?
<img></img>
<meta></meta>
True or False: It is common to see some codebases that include a forward slash inside the void element. Both of these are acceptable.
<img></img>
<img></img>
True
What is an Attribute?
An attribute is a value placed inside the opening tag of an HTML element. Attributes provide additional information about the element or specify how the element should behave.
What is the basic syntax of an Attribute?
<element></element>
What is a Boolean Attribute.
A Boolean Attribute is an attribute that can either be present or absent in an HTML tag. If present, the value is true otherwise it is false.
What are some examples of Boolean Attributes.
disabled
readonly
required
What are Comments?
Comments are used in programming to leave notes for yourself and other developers in your code.
What is the basic syntax of a Comment?
<!--This is an HTML Comment.-->
What are Heading Elements?
There are six Heading Elements in HTML. The h1 through h6 are used to signify the importance of content below them. The lower of the number, the higher the importance.
What is the basic syntax of Heading Elements?
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
What is a Paragraph Element?
Paragraph Elements are used for paragraphs on a webpage.
What is the basic syntax of a Paragraph Element?
<p>This is a paragraph element.</p>
What is an Image Element?
The Image Element ,<img></img>, is used to add images to the web page. The source attribute, src, is used to specify the location the location for that image. For Image Elements, its good practice to include another attribute called the alternate attribute, alt.
What is the basic syntax of an Image Element using the source and alternate attributes?
<img></img>
What is a Body Element?
Body Elements are used to represent the content for the HTML document.
What is the basic syntax of a Body Element?
<body>
<h1>This is a header.</h1>
<p>This is a paragraph.</p>
</body>
What is a Section Element?
Section Elements are used to divide up content into smaller sections.
What is the basic syntax of a Section Element?
<section>
<h2>This is a second header.</h2>
<p>This is another paragraph.</p>
</section>
What is a Division Element?
Division Elements are a generic HTML element that does not hold any semantic meaning. It is used as a generic container to hold other HTML elements.
What is the basic syntax of a Diviision Element?
<div>
<h3>This is a third header.</h3>
<p>This is yet another paragraph.</p>
</div>
- Item
- Item
- Item
- Item
- Item
- Item
This is an example.
Important: This is an example.

This is an example.
This is an <img/> element.