0

Can I use only html to create a something like below code.

https://code.sololearn.com/W8eVvr1RsEu2/?ref=app

30th Oct 2017, 11:06 AM
HighFlyer
HighFlyer - avatar
6 Answers
+ 5
@visph Try to run this HTML code .. <!DOCTYPE html> <html> <body> <h2>The Old Way - using float</h2> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="float:left; width:150px; height:75px; margin:10px; border:3px solid #73AD21;">Floating box</div> <div style="clear:left; border:3px solid red;">Another box, after the floating boxes...</div> </body> </html> .. Tell me now is it give the same result as its original or not? šŸ˜Ž
30th Oct 2017, 12:39 PM
AmĀ²ar YasĀ²er
AmĀ²ar YasĀ²er - avatar
+ 5
'style' attribute use Css: there's no differences between use of external css rules (in another file or embeded in <style> tag), or inlined in the 'style' attributes of elements ^^
30th Oct 2017, 12:47 PM
visph
visph - avatar
+ 4
You can but it is complex !! replace all what written in CSS classes where each class attribute itself found in the html tag šŸ˜šŸ˜
30th Oct 2017, 12:16 PM
AmĀ²ar YasĀ²er
AmĀ²ar YasĀ²er - avatar
+ 4
@Ammar: Html attributes dedicated to styling doesn't cover all css possibilities, and almost are deprecated in Html5...
30th Oct 2017, 12:18 PM
visph
visph - avatar
+ 3
What did you mean by "only html"? In my point of view, Html+Css is quite "only Html", because Css was created to separate style from structure in Html code... so without Css you can only do very very basic layouts ^^ And about your specific code (happy to see that you probably never more post the question now you've get the code to do your assignement), there's no ways to do equivalent output with "strictly only html" ^^
30th Oct 2017, 11:35 AM
visph
visph - avatar
+ 3
In this code CSS is used, but by the local way.
30th Oct 2017, 12:14 PM
ThreeG
ThreeG - avatar