HTML Flashcards
What is a markup language?
A language that uses tags to identify content.
Example of an HTML tag
What are HTML tags?
it is the closing and opening of an HTML document. example:
What does a markup language use to identify content?
Tags
Each paragraph in the example is formatted differently to demonstrate what each tag does:
The browser does not display comments, but they help document the HTML and add descriptions, reminders, and other notes.
HTML documents are made up of HTML elements.
An HTML element is written using a start tag and an end tag, and with the content in between.
Attributes provide additional information about an element or a tag, while also modifying them. Most attributes have a value; the value modifies the attribute.
In this example, the value of “center” indicates that the content within the p element should be aligned to the center:
As an example, we can modify the horizontal line so it has a width of 50 pixels.
This can be done by using the width attribute:
An element’s width can also be defined using percentages:
The align attribute is used to specify how the text is aligned.
In the example below, we have a paragraph that is aligned to the center, and a line that is aligned to the right.
The HTML image syntax looks like this:
You need to put in the image location for the src attribute that is between the quotation marks.
For example, if you have a photo named “tree.jpg” in the same folder as the HTML file, your code should look like this:
To define the image size, use the width and height attributes.
The value can be specified in pixels or as a percentage: