HTML Flash Cards

What is HTML?
Answer: HTML (Hypertext Markup Language) is a standard markup language used for creating web pages and web applications.
What are the basic elements of an HTML document?
Answer: HTML document includes head and body sections. Head contains the title and other meta-information about the document, while the body contains the content of the page.
What is the syntax for creating a hyperlink in HTML?
Answer: <a href= url that you want >link text</a>
What are the heading tags in HTML?
Answer: HTML heading tags are h1, h2, h3, h4, h5, and h6, which represent different levels of headings in a document.
What is the difference between a block-level element and an inline element in HTML?
Answer: Block-level elements take up the entire width of their parent element and create a new line, while inline elements only take up the width of their content and do not create a new line.
What is the difference between the <div> and <span> elements in HTML?
Answer: The <div> element is a block-level element used to group other elements together, while the <span> element is an inline element used to apply styles to a small piece of content.
What is the <img> tag used for in HTML?
Answer: The <img> tag is used to insert an image into an HTML document.
What is the difference between the <ol> and <ul> tags in HTML?
Answer: The <ol> tag is used to create an ordered list, while the <ul> tag is used to create an unordered list.
What is the <table> tag used for in HTML?
Answer: The <table> tag is used to create a table in an HTML document.
What is the difference between the <header> and <footer> tags in HTML?
Answer: The <header> tag is used to define a header section for a document or section, while the <footer> tag is used to define a footer section.
What is the difference between the <b> and <strong> tags in HTML?
Answer: The <b> tag is used to make text bold, while the <strong> tag is used to indicate that the text is important.
What is the difference between the <i> and <em> tags in HTML?
Answer: The <i> tag is used to make text italic, while the <em> tag is used to indicate emphasis.
What is the <form> tag used for in HTML?
Answer: The <form> tag is used to create a form for user input.
What is the <input> tag used for in HTML
Answer: The <input> tag is used to create form controls such as text boxes, radio buttons, and checkboxes.
What is the <textarea> tag used for in HTML?
Answer: The <textarea> tag is used to create a multi-line text input field.
What is the <select> tag used for in HTML?
Answer: The <option> tag is used to define an option in a drop-down list created by the <select> tag.
What is the <label> tag used for in HTML?
Answer: The <label> tag is used to associate a label with a form control.
What is the difference between the <id> and <class> attributes in HTML?
Answer: The <id> attribute is used to uniquely identify an element, while the <class> attribute is used to specify one or more classes for an element.
What is the difference between the <div> and <section> tags in HTML?
Answer: The <div> tag is a generic container for content, while the <section> tag is used to group related content.
What is the <option> tag used for in HTML?
Answer: The <option> tag is used to define an option in a drop-down list created by the <select> tag.