Inline Elements

Inline HTML elements do not force a line break before or after them.  The <a> anchor tag, just discussed, is an example of an inline element.

Another popular inline element is <b> or <strong>. Text can be made bold by using <b> or <strong>.  The <strong> tag is considered to be more accessible for individuals using screen readers.


<body>
	<p>
		<b>This text is bold</b>
	</p>
	<p>
		<strong>This text is bold</strong>
	</p>
</body>

Text can be made italic by using <i> or <em>.  The <em> emphasis tag is considered to be more accessible for individuals using screen readers.


<body>
	<p>
		<i>This text is italic</i>
	</p>
	<p>
		<em>This text is italic </em>
	</p>
</body>

Note: both bold and italics can be applied through CSS as we’ll see later.

Leave a Reply

*