HTML Basics Flashcards
Basics of HTML
- What does HTML stand for?
- HyperText Markup Language.
- What is HTML used for?
- HTML is used to structure content on web pages using elements and tags.
- Which HTML tag defines the root of an HTML document?
- <html> tag.
- Which tag contains metadata about the HTML document?
- <head> tag.
- Which tag contains the visible content of a web page?
- <body> tag.
- Which HTML tag is used to create a hyperlink?
- <a> tag.
- Which attribute specifies the URL of a link in an anchor tag?
- href attribute.
- Which HTML tag is used to display an image?
- <img> tag.
- Which attribute specifies the image path in an <img> tag?
- src attribute.
- Which attribute provides alternative text for an image?
- alt attribute.
- Which HTML tag is used for the largest heading?
- <h1> tag.
- How many heading levels exist in HTML?
- Six levels: <h1> to <h6>.
- Which tag is used to create a paragraph?
- <p> tag.
- Which tag inserts a line break?
- <br> tag.
- Which tag creates a horizontal line?
- <hr> tag.
- Which tag is used for bold text in HTML?
- <b> tag or <strong> tag.
- Which tag is used for italic text?
- <i> tag or <em> tag.
- What is the purpose of the <title> tag?
- It defines the title of the webpage shown in the browser tab.
- Which HTML tag is used to create an unordered list?
- <ul> tag.
- Which HTML tag is used to create an ordered list?
- <ol> tag.
- Which tag defines a list item?
- <li> tag.
- Which HTML tag is used to create a table?
- <table> tag.
- Which tag defines a row in a table?
- <tr> tag.
- Which tag defines a header cell in a table?
- <th> tag.
- Which tag defines a standard cell in a table?
- <td> tag.
- Which attribute allows a table cell to span multiple columns?
- colspan attribute.
- Which attribute allows a table cell to span multiple rows?
- rowspan attribute.
- Which HTML tag is used to create a form?
- <form> tag.
- Which tag is used to create an input field in a form?
- <input> tag.
- Which attribute specifies the type of input field?
- type attribute.
- Which input type creates a password field?
- type="password".
- Which input type creates a checkbox?
- type="checkbox".
- Which input type creates a radio button?
- type="radio".
- Which tag creates a dropdown list?
- <select> tag.
- Which tag defines an option in a dropdown list?
- <option> tag.
- Which tag is used for multi-line text input?
- <textarea> tag.
- Which attribute specifies where form data is sent?
- action attribute.
- Which attribute specifies how form data is sent?
- method attribute (GET or POST).
- What does the GET method do in forms?
- It sends form data in the URL query string.
- What does the POST method do in forms?
- It sends form data in the HTTP request body.
- What is a semantic HTML element?
- An element that clearly describes its meaning to both browser and developer.
- Give examples of semantic HTML elements.
- <header>, <nav>, <main>, <article>, <section>, <footer>.
- Which tag represents the main content of a document?
- <main> tag.
- Which tag represents navigation links?
- <nav> tag.
- Which tag represents independent content like a blog post?
- <article> tag.
- Which tag represents a thematic grouping of content?
- <section> tag.
- Which tag defines footer content?
- <footer> tag.
- Which tag is used to embed video content?
- <video> tag.
- Which tag is used to embed audio content?
- <audio> tag.
- What is the purpose of the <!DOCTYPE html> declaration?
- It tells the browser the document is written in HTML5.