Inline-Level Elements
inline-level elements create an element box within a line and do not break up the flow.
The following code changes p to be inline.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
<style type="text/css">
p {
display: inline;
}
span {
display: inline;
border: medium double black;
margin: 2em;
width: 10em;
height: 2em;
}
</style>
</head>
<body>
<p>
HyperText Markup Language (HTML) is the main markup language for
displaying web pages and other information that can be displayed
in a web browser(From From Wikipedia, the free encyclopedia).
</p>
<p>
HyperText Markup Language (HTML) is the main markup language for
displaying web pages and other information that can be displayed
in a web browser(From From Wikipedia, the free encyclopedia).
</p>
</body>
</html>
Home
HTML CSS Book
CSS
HTML CSS Book
CSS
display:
- Block-Level Elements
- Inline-Level Elements
- inline-block
- Run-In Elements
- Hiding Elements
Related: