Intro to Programming Flashcards
Defines that this document is an HTML5 document.
<!DOCTYPE html>
This is the root element of an HTML page
<html>
</html>
It specifies a title for the HTML page (which is shown in the browser’s title bar or in the page’s tab).
<title>
</title>
It defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
<body>
</body>
This element defines a large heading.
<h1>
</h1>
This element defines a paragraph.
<p>
</p>
It is defined by a start tag, some content, and an end tag
<tagname> content goes here.. </tagname>
HTML element
Provides additional information about HTML elements.
HTML attributes
Are always specified in the start tag and usually come in name/value pairs like: name=”value”
attributes
Specifies the URL of the page the link goes to.
href attribute
This tag defines a hyperlink.
<a></a>
This tag is used to embed an image in an HTML page.
<img></img>
This attribute specifies the path to the image to be displayed.
src
What are the two ways to specify the URL in the src attribute?
- Absolute URL
- Relative URL
Links an external image that is hosted on another website.
Example: src:”https;//www.w3schools.com/images/img_girl.jpg:.
Absolute URL