HTML Flashcards
(45 cards)
Full Form of HTML
Hyper Text Markup Language
Basic HTML Structure
<!DOCTYPE html>
<html>
<head>
<meta></meta>
<title>title</title>
</head>
<body>
</body>
</html>
What does <!DOCTYPE html> stand for?
The <!DOCTYPE html> declaration defines that this document is an HTML5 document
What does <html> stand for?
The <html> element is the root element of an HTML page
What does <head> stand for?
The <head> element contains meta information about the HTML page
What does <title> stand for?</title>
The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)</title>
What does <body> stands for?
The <body> element defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
How do you add headings in html?
By use of tags from <h1> </h1> to </h6>.
Where <h1> is the most important heading in the body and it decreases going down the line, <h6> being the less important.
What does <p> stands for?
The <p> element defines a paragraph.
What does <br></br> stands for?
The <br></br> element adds a line break in a paragraph.
What does <a> stands for?</a>
The <a> element is used for adding links into a webpage.</a>
e.g. <a>This is a link</a>
Where href is used for adding the web address.
How do you host images in html?
HTML images are defined with the <img></img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
E.g. <img></img>
What does the style attribute do?
The style attribute is used to add styles to an element, such as color, font, size, and more.
What does the lang attribute do?
The lang attribute is used to define language of then webpage.
It is used to assist web browser and search engines.
Country codes can also be added to the language code in the lang attribute. So, the first two characters define the language of the HTML page, and the last two characters define the country.
What does the title attribute do?
The title attribute defines some extra information about an element.
What does the <hr> tag do?
The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.
What does the <pre> tag do?
The HTML <pre> element defines preformatted text.
The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks
What are the different style attributes?
background-color for background color
color for text colors
font-family for text fonts
font-size for text sizes
text-align for text alignment
What are the different formatting attributes?
<b> - Bold text
<strong> - Important text
<i> - Italic text
<em> - Emphasized text
<mark> - Marked text
<small> - Smaller text
<del> - Deleted text
<ins> - Inserted text
- Subscript text
- Superscript text</ins></del></small></mark></em></i></strong></b>
What are the different Quotation and Citation elements?
- <abbr> - Defines an abbreviation or acronym</abbr>
- <address> - Defines contact information for the author/owner of a document
</address> - <bdo> - Defines the text direction</bdo>
- <blockquote> - Defines a section that is quoted from another source
</blockquote> - <cite> - Defines the title of a work</cite>
- <q> - Defines a short inline quotation</q>
What are the different values for the target attribute for links?
- _self - Default. Opens the document in the same window/tab as it was clicked
- _blank - Opens the document in a new window or tab
- _parent - Opens the document in the parent frame
- _top - Opens the document in the full body of the window
What are absolute and relative URLs?
Absolute URLs - a full web address
Relative URLs - a link to a page within the same website
How to use an image as a link?
To use an image as a link, just put the <img></img> tag inside the <a> tag:</a>
<a>
<img></img>
</a>
How to link an email address?
Use mailto: inside the href attribute to create a link that opens the user’s email program :
<a> Send Mail </a>
Chapter 4
Then, add a link to the bookmark ("Jump to Chapter 4"), from within the same page: Jump to Chapter 4
Person 1 | Person 2 | Person 3 |
---|---|---|
Emil | Tobias | Linus |
16 | 14 | 10 |
- tag. Each list item starts with the
- tag.
Firstname | Lastname | Age |
---|
Firstname | Jill | Eve |
---|
- tag. Each list item starts with the
- tag.
- tag defines the description list, the
- tag defines the term (name), and the
- tag describes each term
- Coffee
- - black hot drink
- Milk
- - white cold drink
and
Save the document by pressing Ctrl + S